RE: Processing solr response....
This kind of thing is what I was getting at in SOLR-344 (https://issues.apache.org/jira/browse/SOLR-344). There I said I'd post a prototype Java API - but for now, I've had to give up and go back to my home-grown Lucene-based code. -Original Message- From: Ravish Bhagdev [mailto:[EMAIL PROTECTED] Sent: 04 September 2007 15:30 To: solr-user@lucene.apache.org Subject: Processing solr response Hi, Apologies if this has been asked before but I couldn't find anything when I searched... I have been looking ant SolJava examples. I've been using Nutch/Lucene before which returns results from query nicely in a class with url, title and snippet (summary). While Solr seems to return XML with score and other details with just the url field. Is there a way to avoid having to deal with XML after each query? I want to avoid parsing it will be much better if I could get results directly into a Java data structure like a List or Map etc through the API. Also can anyone point me to some example or documentation which clarifies XML returned by Solr and also how to get variations of this including specifying what exactly i would see in xml like which particular fields etc. Hope i'm making sense Thanks, Ravi
Re: Processing solr response....
I am trying to build a sample program(in Java). But, to do this i have some queries, as basic documentation - which i am not able to find. Some basic Qs: - Does Solr create its own index or is it a wrapper on lucene index(i et its the latter) - If answer to the prev Q is NO, then how is the SOlr index diff from the lucene index. - IndexReader and IndexWriter will no longer be used in the SOlr programs - yes/no ? - some documentation on using remote indexes with SOlr ( also faceted searching) thanks , Venkat On 9/4/07, Jonathan Woods [EMAIL PROTECTED] wrote: This kind of thing is what I was getting at in SOLR-344 (https://issues.apache.org/jira/browse/SOLR-344). There I said I'd post a prototype Java API - but for now, I've had to give up and go back to my home-grown Lucene-based code. -Original Message- From: Ravish Bhagdev [mailto:[EMAIL PROTECTED] Sent: 04 September 2007 15:30 To: solr-user@lucene.apache.org Subject: Processing solr response Hi, Apologies if this has been asked before but I couldn't find anything when I searched... I have been looking ant SolJava examples. I've been using Nutch/Lucene before which returns results from query nicely in a class with url, title and snippet (summary). While Solr seems to return XML with score and other details with just the url field. Is there a way to avoid having to deal with XML after each query? I want to avoid parsing it will be much better if I could get results directly into a Java data structure like a List or Map etc through the API. Also can anyone point me to some example or documentation which clarifies XML returned by Solr and also how to get variations of this including specifying what exactly i would see in xml like which particular fields etc. Hope i'm making sense Thanks, Ravi --
RE: Processing solr response....
This goes through the Solr http response, right? The Solr XSL processor feature will do this for you. You write an XSL script and add it to $SOLR/conf/xslt. You then use extra parameters in a query. The output XML will be transformed by the XSL. The XSL can create anything you want: lists of IDs, etc. I just wrote a script that creates the update format, so that I can do bulk copies from production into our development solr. I did not implement the multivalued arr data type; if someone wants to do this and submit it please contact me. -Original Message- From: Ravish Bhagdev [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 04, 2007 7:30 AM To: solr-user@lucene.apache.org Subject: Processing solr response Hi, Apologies if this has been asked before but I couldn't find anything when I searched... I have been looking ant SolJava examples. I've been using Nutch/Lucene before which returns results from query nicely in a class with url, title and snippet (summary). While Solr seems to return XML with score and other details with just the url field. Is there a way to avoid having to deal with XML after each query? I want to avoid parsing it will be much better if I could get results directly into a Java data structure like a List or Map etc through the API. Also can anyone point me to some example or documentation which clarifies XML returned by Solr and also how to get variations of this including specifying what exactly i would see in xml like which particular fields etc. Hope i'm making sense Thanks, Ravi
Re: Processing solr response....
: - Does Solr create its own index or is it a wrapper on lucene index(i et its : the latter) Lucene in the context of this discussion is a Java Library. Solr is an application written in Java -- Solr uses the Lucene library to create an index. : - If answer to the prev Q is NO, then how is the SOlr index diff from the : lucene index. the index is a Lucene index, which can be read by any application that uses the Lucene library -- one caveat to this is that depending on the FieldTypes you tell Solr to use, the field values may be encoded in ways that other applications will not understand. several people have used Solr to search indexes built by their own custom code, or by nutch (and vice versa) : - IndexReader and IndexWriter will no longer be used in the SOlr programs - : yes/no ? Solr provides an HTTP API for indexing and searching data. your application can be written in any language you want, and communicates with Solr over HTTP -- it can get the responses back in a variety of formats. : - some documentation on using remote indexes with SOlr ( also faceted : searching) you have to elaborate on what you mean by remote indexes ... Solr as a web service can be as remote as you want it to be from your clients (as long as your clients can reach it over the network using HTTP) but it accesses the underlying index using the filesystem. If you mean you want Solr to be able to access the unerlying index across a network in real time -- that is not suported. You can however use the replication scripts to create you index on one master machine and then have any number of slave machines pull it -- Solr can then begin to seamlessly use the new index while it finishs existing requests using the old index. -Hoss