Re: Multiple queries in single request
On Sat, Mar 7, 2009 at 4:06 AM, Ryan McKinley wrote: > >>> No but you can always fire three requests. Writing your own handler which >>> prints data in a custom format means that you can no longer use existing >>> solr clients for java/ruby/python etc. >>> >> >> That's not a fair characterization of at least the Ruby client. The >> NamedList (err, Hash in Ruby) is simply a data structure returned that can >> be easily navigated. Sure, any client API that expects a certain structure >> will have issues, but in general no problem in just Hashing it out. >> >> > Also not entirely true for the solrj client. Assuming the response > includes the standard solr data structures (NamedList, DocList, Doc, etc...) > the solrj client will parse the response. > Yes, apologies for the wrong characterization. I meant to say that one cannot use the nice API methods to navigate the results. -- Regards, Shalin Shekhar Mangar.
Re: Luke request handler
Revas, use ...luke?fl=FieldYouWant&numTerms=NumberOfTermsYouWant Otis -- Sematext -- http://sematext.com/ -- Lucene - Solr - Nutch - Original Message > From: revas > To: solr-user@lucene.apache.org > Sent: Friday, March 6, 2009 6:10:23 AM > Subject: Luke request handler > > Hi, > > I just want to confirm my understanding of luke request handler. > > It gives us the raw lucene index tokens on a field by field basis. > > > What should be the query to return all tokens for a field . > > > > Is there any way to return all the token across all fields > > Regards > Revas
Type of object to go into NamedList as part of SearchComponent#process(ResponseBuilder rb)
I am developing this system in which I adding custom SearchComponents (last-components) after all the post-processing of the query. server: --- MyComponent extends SearchComponent : @Override public void process(ResponseBuilder rb) { MySerializableType obj = new MySerializableType(); //populate obj after processing rb.rsp.add("myresult" , obj ); } } client: QueryResponse rsp = commonsHttpSolrServer.query( mySolrQuery); MySerializableType obj = rsp.getResponse().get("myresult"); I was curious if the above mentioned code would work for any kind of serializable type , T, as long as it implements Serializable . Would there be any restrictions on the same (like only List of Strings - List of Integers etc). Thanks.
Query Boosting using both BQ and BF
Hi, I have a couple of questions related to query boosting using the dismax request handler. I'm using a recent 1.4 build (to take advantage of omitTf), and have also tried all of this with 1.3. To apply a query-time boost to the previous 3 months of documents in my index I use: published_date_d:[NOW-3MONTHS/DAY TO NOW/DAY+1DAY]^10.2 And, to provide a boosting that helps rank recently documents higher I use: recip(rord(published_date_d),20,5000,5)^5.5 This seems to be working well. But I have more boosting requirements. For example, I need to boost documents that are tagged as printed. So, I tried to add another bq parameter: is_printed_b:true^4.0 Also, tried to append this space-separated all in one bq parameter like this: published_date_d:[NOW-3MONTHS/DAY TO NOW/DAY+1DAY]^10.2 is_printed_b:true^4.0 Lastly, I need to apply a negative boost to documents of a certain type, so I use: -is_mp_parent_b:true^50.0 Not sure if it matters, but I have in schema.xml None of those variations return expected results (it's like the bq is being applied as a filter instead of just applying boosts). Q1. Can anyone confirm whether bf and bq can both be used together in solrconfig.xml? Q2. Is there a way I can do ths using only BF? How? Q2. Can I have multiple bq parameters? If so, do I space-separate them as a single bq, or provide multiple BQs? Q3. Am I formulating my BQs that use Boolean fields correctly? Any help or insights much appreciated, Thanks Dean CLSA CLEAN & GREEN: Please consider our environment before printing this email. The content of this communication is subject to CLSA Legal and Regulatory Notices. These can be viewed at https://www.clsa.com/disclaimer.html or sent to you upon request.
Re: Type of object to go into NamedList as part of SearchComponent#process(ResponseBuilder rb)
On Sun, Mar 8, 2009 at 5:34 AM, Rakesh Sinha wrote: > > client: > > QueryResponse rsp = commonsHttpSolrServer.query( mySolrQuery); > MySerializableType obj = rsp.getResponse().get("myresult"); > > I was curious if the above mentioned code would work for any kind of > serializable type , T, as long as it implements Serializable . Would > there be any restrictions on the same (like only List of Strings - > List of Integers etc). > Thanks. > No, the returned object is a NamedList data structure. It can contain the basic java types (int/float etc.), strings, lists, maps and a couple of Solr specific objects such as SolrDocumentList, SolrDocument http://lucene.apache.org/solr/api/solrj/org/apache/solr/common/util/NamedList.html -- Regards, Shalin Shekhar Mangar.
RE: Query Boosting using both BQ and BF
Some more experiments have helped me answer my own questions. > Q1. Can anyone confirm whether bf and bq can both > be used together in solrconfig.xml? yes > Q3. Can I have multiple bq parameters? If so, do I > space-separate them as a single bq, or provide > multiple BQs? Yes, multiple bq parameters work, space-separating multiple query terms in a single bq also works. Here's a snippet of my solrconfig.xml: published_date_d:[NOW-3MONTHS/DAY TO NOW/DAY+1DAY]^5.2 OR (published_date_d:[NOW-12MONTHS/DAY TO NOW/DAY+1DAY] AND report_type_id_i:1004)^10.0 OR (published_date_d:[NOW-6MONTHS/DAY TO NOW/DAY+1DAY] AND is_printed_b:true)^4.0 is_mp_parent_b:false^10.0 recip(rord(published_date_d),20,5000,5)^5.5 -Original Message- From: Dean Missikowski (Consultant), CLSA Sent: 08/03/2009 12:01 PM To: solr-user@lucene.apache.org Subject: Query Boosting using both BQ and BF Hi, I have a couple of questions related to query boosting using the dismax request handler. I'm using a recent 1.4 build (to take advantage of omitTf), and have also tried all of this with 1.3. To apply a query-time boost to the previous 3 months of documents in my index I use: published_date_d:[NOW-3MONTHS/DAY TO NOW/DAY+1DAY]^10.2 And, to provide a boosting that helps rank recently documents higher I use: recip(rord(published_date_d),20,5000,5)^5.5 This seems to be working well. But I have more boosting requirements. For example, I need to boost documents that are tagged as printed. So, I tried to add another bq parameter: is_printed_b:true^4.0 Also, tried to append this space-separated all in one bq parameter like this: published_date_d:[NOW-3MONTHS/DAY TO NOW/DAY+1DAY]^10.2 is_printed_b:true^4.0 Lastly, I need to apply a negative boost to documents of a certain type, so I use: -is_mp_parent_b:true^50.0 Not sure if it matters, but I have in schema.xml None of those variations return expected results (it's like the bq is being applied as a filter instead of just applying boosts). Q1. Can anyone confirm whether bf and bq can both be used together in solrconfig.xml? Q2. Is there a way I can do ths using only BF? How? Q3. Can I have multiple bq parameters? If so, do I space-separate them as a single bq, or provide multiple BQs? Q3. Am I formulating my BQs that use Boolean fields correctly? Any help or insights much appreciated, Thanks Dean CLSA CLEAN & GREEN: Please consider our environment before printing this email. The content of this communication is subject to CLSA Legal and Regulatory Notices. These can be viewed at https://www.clsa.com/disclaimer.html or sent to you upon request.