Hi, I'm having a problem. Suppose that I have a node title "integration of the amazing systems". I need to be able to:
1. Search for "tegra" and retrieve this node. (Searching part of the word "integration")
2. Search for "yst" and retrieve this node. (Searching part of the word "systems")
3. Search for "tegra sys" and retrieve this node. (separated words: we have 3 words separating "integration" and "systems")
And all of this should be sorted by relevance. Meaning that, for instance on case 3, if I actually have a node called "Tegra sys", this node should appear first.
Did you get the picture?
Currently, I have a "Canon Powershot 500" indexed. If I search for:
1. "can": it returns nothing.
2. "canon 500": it returns nothing.
3. "canon": it returns the node.
Is this a schema.xml tokenization problem?? (I searched over the internet, and made some modification using trial and error, but no success)
PLEASE, I'M GOING NUTS.
THANKS
Comments
Comment #1
kscheirerWell, it definitely has to do with tokens at least :)
The title field gets tokenized using a bunch of different filters, including a stemmer (SnowballPorter). This reduces words to their root forms. The QueryParser also takes the user input, and reduces it to root forms. If the two tokens match, you get a result.
So "can" will never work, since "can" != "canon", but "canon" will match, as will "canons" or "canoned". I would have expected "canon 500" to be good enough to return a result, I can't explain that one.
It sounds like you want something more like a wildcard search - I'd be interested to hear if folks have a nice solution for that.
Comment #2
Operations-1 commentedI think I should use the EdgeNGramTokenizer but It does not seem to work. Maybe I don't really know how to configure schema.xml. PLEASE, somebody proficient in Solr, help me!!! It seems that the search only matches whole words. And when I search for 2 separated words, it doesn't work either! Basically, I need solr to function in a very "loose" manner.
My worst problem is "canon 500". If I cannot get this to work, my boss will eat me alive!
Thanks!
Comment #3
jpmckinney commentedThe Solr mailing lists will be better able to help with Solr specific questions: http://lucene.apache.org/solr/mailing_lists.html
Comment #4
jpmckinney commentedRelated #270412: Partial-word search completion
Comment #5
pwolanin commentedUse the Solr analyzer interface to understand what tokens are generated at index time and query time.
Comment #6
pwolanin commented