Re: prefixquery, phrasequery support in solr
On 1/9/07, Chris Hostetter <[EMAIL PROTECTED]> wrote: which is not to say that i don't see any benefit from an API like the one you desribe: it just seems like it would make more sense as a custom RequesetHandler that interpretes it's input differently -- not as a low level schema option. Right... seems like the type of stuff that dismax does... treat the query as more of a user query and expand to different low level query types (maxdisjunction, sloppy phrase, etc) to increase relevance. -Yonik
Re: prefixquery, phrasequery support in solr
: Ideally, I would like to have a parameter similar to defaultOperator, : like defaultQueryType which can take on values PREFIXQUERY, PHRASEQUERY : in which case the query string won't be parsed by QueryParser and will : interpreted as a prefix query. E.g., assume I have : in my schema.xml I'm not sure how generally usefull that would be ... the defaultOperator is just that: a default, people can still be explicit on a per query basis -- but what you are describing would fundementally change the way the request handler interpreted simple words, with no way for clients to indicate when they truely just want a term query. which is not to say that i don't see any benefit from an API like the one you desribe: it just seems like it would make more sense as a custom RequesetHandler that interpretes it's input differently -- not as a low level schema option. -Hoss
Re: prefixquery, phrasequery support in solr
Ok, let me show an example. Assume, I want to perform the following search: cat AND dog. I can perform it 3 different ways: a) simply search for: cat AND dog (cat +dog) b) search for: cat dog (assuming schema.xml has c) search for: cat dog (passing q.op=AND query parameter to the requesthandler). I am wondering I can do something similar to b) and c) if I want to perform a prefix query (of phrasequery)... Ideally, I would like to have a parameter similar to defaultOperator, like defaultQueryType which can take on values PREFIXQUERY, PHRASEQUERY in which case the query string won't be parsed by QueryParser and will interpreted as a prefix query. E.g., assume I have in my schema.xml and I search for: solr, then it will be interpreted as the solr* query in the current context (which is a prefix search, because currently the queryparser parses the query string by default). thanks, mirko Quoting Chris Hostetter <[EMAIL PROTECTED]>: > > : I would like to know if there is a way to support prefix, phrase, etc > queries > : in solr. I know that the queries, such as solr* and "solr" would do the > trick, > : but I am looking for a solution similar to the SolrQueryParser > defaultOperator > : setting (with q.op={OR|AND} or in the schema config file). > : > : If such support does not exist, would it be a useful thing to have? > > I'm having a little trouble understanding what you mean ... can you > elaborate with some examples (both of what the configuration would look > like, and what hte behavior would be with some example inputs) > > > > > -Hoss >
Re: prefixquery, phrasequery support in solr
: I would like to know if there is a way to support prefix, phrase, etc queries : in solr. I know that the queries, such as solr* and "solr" would do the trick, : but I am looking for a solution similar to the SolrQueryParser defaultOperator : setting (with q.op={OR|AND} or in the schema config file). : : If such support does not exist, would it be a useful thing to have? I'm having a little trouble understanding what you mean ... can you elaborate with some examples (both of what the configuration would look like, and what hte behavior would be with some example inputs) -Hoss