Hoss thanks,
hm it might be a problem with not (specifically..) using analyzers.
But I always thought such code:
Term term = new Term("text", str);
TermQuery tq = new TermQuery(term);
query.add(tq, Occur.SHOULD);
would get query terms through analyzers - since they are specified under
<fieldType name="text" class="solr.TextField" positionIncrementGap="100"
omitNorms="false">
...
<analyzer type="query">
Is that not true?
Cheers. D.
hossman wrote:
>
>
> Hmmm... everything seems right here.
>
> This may be a silly question, but
> you are calling rsp.add("response", docs_main.docList) in your custom
> handler correct?
>
> second question: how are you building up your query obejct? the only
> thing i can think of is that you are constructing the TermQueries directly
> (without using the analyzer) so they don't match what's really in the
> index (ie: things aren't being lowercased, not splitting on "." and "_")
> but when you cut/paste the query string into standard request handler it
> uses the QueryParser which does the proper analysis.
>
> what does debugQuery=true say about your query when you cut/paste the
> query string?
>
> can you post the full code of your custo mrequest handler?
>
>
> : Hi,
> : my problem is as follows: my request handler's code
> :
> : filters = null;
> : DocListAndSet docs_main = searcher.getDocListAndSet(query, filters,
> null,
> : start, rows, flags);
> : String querystr = query.toString();
> : rsp.add("QUERY_main", querystr);
> :
> :
> : gives zero responses:
> :
> : <str name="QUERY_main">((text:Travel text:Home text:Online_Archives
> : text:Ireland text:Consumer_Information text:Regional text:Europe
> text:News
> : text:Complaints text:CNN.com text:February text:Transport
> : text:Airlines)^0.3)</str>
> : <result name="response" numFound="0" start="0" maxScore="0.0" />
> :
> :
> : While copying the "QUERY_main" string into Solr admin returns full of
> them:
> :
> : <str name="q">
> : (text:Travel text:Home text:Online_Archives text:Ireland
> : text:Consumer_Information text:Regional text:Europe text:News
> : text:Complaints text:CNN.com text:February text:Transport
> text:Airlines)^0.3
> : </str>
> : <str name="rows">10</str>
> : <str name="version">2.2</str>
> : </lst>
> : </lst>
> : ÿÿ
> : <result name="response" numFound="71584" start="0">
> :
> :
> :
> : Please help me understand what's going on, I'm a bit confused atm.
> Thanks
> : :-)
>
> -Hoss
>
>
--
View this message in context:
http://www.nabble.com/custom-handler-results-don%27t-seem-to-match-manually-entered-query-string-tp15544268p15629988.html
Sent from the Solr - User mailing list archive at Nabble.com.