no result when searching sentences in solr
I index some pdf and docx with solrj and when i want to create query some sentences like "We'd be glad to have you accompany" or anything else, the result is emp开发者_运维技巧ty. is it any configuration?
Too vague a question to really answer.
Does the query q=: return you any results ?
Whats the fields your are searching upon ?
Whats your configuration in the schema.xml ?
whats the analyzes being done at both query and index time ?
whats the queryparser or request handler you are using ?
you can use debugQuery=on on the search url to get the information, which you help you debug further.
What you are trying to do is to search for an phrase. So it's important to know, which query parser you are using and how the field type is defined.
I run at the equal situation, where phrases does not work. The reason was an different handling on index and query time at one filed. For example if your field definition (schema.xml) is spitted into "query" and "index" -analyzer, but only at indexing-time u applied an stopword-filter.
So whats happens: the phrase "born to be wild"
- on index-time the stop words where removed, so only born
and wild
was indexed. Searching for a pharse, which should match exact "born to be wild" returns no hits.
So for you: check if you are using same tokenizer and filters at indexing and query time. Btw: checkaout the http://localhost:8983/solr/admin/analysis.jsp with verbose output to see, how solr handles your query.
精彩评论