Re: Build query programmatically with lucene, but issue to solr?
: I am building up a query with quite a bit of logic such as parentheses, plus : signs, etc... and it's a little tedious dealing with it all at a string : level. I was wondering if anyone has any thoughts on constructing the query : in lucene and using the string representation of the query to send to solr. There was another thread where this idea came up recently; although your motivation is very differnet from that persons, all of the general concerns still apply... http://search.lucidimagination.com/search/document/514adb88f7288ac1/can_i_use_per_field_analyzers_and_dynamic_fields ...that's not to say that it couldn't be *made* to work out, assuming a limited set of Query types and a specific analyzer were used, but it's not really waht the Query class (or it's toString method) were designed for -- it would probably be easier to write a custom query string formatter class, or to implement a QParser to apply your logic on the server side given simple key-val(s) input params. -Hoss
Build query programmatically with lucene, but issue to solr?
Hi. I am building up a query with quite a bit of logic such as parentheses, plus signs, etc... and it's a little tedious dealing with it all at a string level. I was wondering if anyone has any thoughts on constructing the query in lucene and using the string representation of the query to send to solr. Thanks, Phillip
Re: Build query programmatically with lucene, but issue to solr?
Hi Pillip, could you give me some more information of your environment? A first idea that comes to my mind is to use the SearchComponents for the solution of your problem. You could either replace the whole QueryComponent (not re- commended) or write a (probably small) SearchComponent that creates the Lucene query and puts it into the appropriate place in the ResponseBuilder. If you add such a component to first-components in your handler-definition, you will execute the query. Regards, Sven --On Freitag, 28. Mai 2010 12:23 -0400 Phillip Rhodes rhodebumpl...@gmail.com wrote: Hi. I am building up a query with quite a bit of logic such as parentheses, plus signs, etc... and it's a little tedious dealing with it all at a string level. I was wondering if anyone has any thoughts on constructing the query in lucene and using the string representation of the query to send to solr. Thanks, Phillip
Re: Build query programmatically with lucene, but issue to solr?
Interesting -- I don't think there is anything that does this. Though it seems like something the XML Query syntax should be able to do, but we would still need to add the ability to send the xml style query to solr. On Fri, May 28, 2010 at 12:23 PM, Phillip Rhodes rhodebumpl...@gmail.com wrote: Hi. I am building up a query with quite a bit of logic such as parentheses, plus signs, etc... and it's a little tedious dealing with it all at a string level. I was wondering if anyone has any thoughts on constructing the query in lucene and using the string representation of the query to send to solr. Thanks, Phillip
Re: Build query programmatically with lucene, but issue to solr?
On May 28, 2010, at 9:23am, Phillip Rhodes wrote: Hi. I am building up a query with quite a bit of logic such as parentheses, plus signs, etc... and it's a little tedious dealing with it all at a string level. I was wondering if anyone has any thoughts on constructing the query in lucene and using the string representation of the query to send to solr. Depending on complexity, SolrJ could be a solution. See the section that talks about SolrJ provides a APIs to create queries instead of hand coding the query... on http://wiki.apache.org/solr/Solrj -- Ken Ken Krugler +1 530-210-6378 http://bixolabs.com e l a s t i c w e b m i n i n g