Reputation: 729
I am facing one issue using solr 4.9 with drupal-7 and search API. When I am searching with combination of exclamation point (!), then solr returns an empty result.
E.g:
http://localhost:8983/solr/collection1/select?q=OMG!*&wt=json
The above query return empty result. However, in document there is data with this word:
1. "tm_title": [
"OMG! Ranveer Singh admits to having a 'Casting Couch' experience "
]
2. "tm_title": [
"OMG! Rajinikanth was supposed to dub for 'Dangal'"
]
The result should return this both document as I am searching starting word "OMG!" and followed by anything(*).
EDITED: Following are the druapl search API title field configuration.
Upvotes: 0
Views: 409
Reputation: 52802
When you're using wildcards, the analyzer sequence is mostly skipped. Since the content probably is indexed as "omg" (you can confirm this by using the analysis page of the admin interface), trying to match against tokens that start with "OMG!" won't work (it'll probably search for "omg!", since the lowercasefilter is multiterm aware).
If you drop the '!' from your wildcard, you'll probably get a hit - or if you drop the wildcard at all.
Upvotes: 2