You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Patric Wilms <pw...@kemcom.org> on 2008/01/12 11:33:12 UTC
Wildcard on last char
Hello,
i have encountered a problem concerning the wildcard. When i search for
field:testword i get 50 results. That's ok but when I search for
field:testwor* i get just 3 hits! I get only words returned without a
whitespace after the char like "testwordtest" but i wont find any single
"testword" i've searched before. Why can't I replace a single char at
the end of a word with the wildcard?
Thanks a million,
Patric
Re: Wildcard on last char
Posted by Chris Hostetter <ho...@fucit.org>.
: i have encountered a problem concerning the wildcard. When i search for
: field:testword i get 50 results. That's ok but when I search for
: field:testwor* i get just 3 hits! I get only words returned without a
: whitespace after the char like "testwordtest" but i wont find any single
: "testword" i've searched before. Why can't I replace a single char at the end
: of a word with the wildcard?
What does the fieldtime for "field" look like in your schema? what
exactly is the URL you are using to query solr?
i notice in particular you say "I get only words returned without a
: whitespace after the char" ... which suggests that you expect it to
match documents that have whitespace in the field value (ie: "testword
more words" ... but if you are using an analyzer that splits on
whitespace, those are now seperate terms -- wildcard and prefix searches
match on indexed terms -- not the entire field value (if you want that,
you need to use something like StrField or the KeywordTokenizer .. but i
doubt that's really what you want)
-Hoss