You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by regany <re...@newzealand.co.nz> on 2009/12/06 07:25:49 UTC

parsing the raw query string?

I've just found solr and am looking at what's involved to work with it. All
the examples I've seen only ever use 1 word search terms being implemented
as examples, which doesn't help me trying to see how multiple word queries
work. It also looks like a hell of a lot of processing needs to be done on
the raw query string even before you can pass it to solr (in PHP) - is
everyone processing the query string first and building a custom call to
solr, or is there a query string parser I've missed somewhere? I can't even
find what operators (if any) are able to be used in the raw query string in
the online docs (maybe there aren't any??). Any help or points in the right
direction would be appreciated.
-- 
View this message in context: http://old.nabble.com/parsing-the-raw-query-string--tp26662578p26662578.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: parsing the raw query string?

Posted by Israel Ekpo <is...@gmail.com>.
Hi

If you are planning to use Solr via PHP, you can take a look at the Solr
PECL extension.

http://www.php.net/manual/en/book.solr.php

which you can download from here

http://pecl.php.net/package/solr

There is a SolrQuery class that allows you to build and manage the
name-value pair parameters which you can then pass on to the SolrClient
object for onward transmission to the Solr server. It is also serializable
so you can cache is in the $_SESSION variable to propagate the parameters
from page to page accross requests.

The SolrQuery class has buillt-in methods to add, update, remove and manage
the Facets, Highlighting, MoreLikeThis, Stats, TermsComponents etc.

I hope this helps.

On Sun, Dec 6, 2009 at 1:25 AM, regany <re...@newzealand.co.nz> wrote:

>
> I've just found solr and am looking at what's involved to work with it. All
> the examples I've seen only ever use 1 word search terms being implemented
> as examples, which doesn't help me trying to see how multiple word queries
> work. It also looks like a hell of a lot of processing needs to be done on
> the raw query string even before you can pass it to solr (in PHP) - is
> everyone processing the query string first and building a custom call to
> solr, or is there a query string parser I've missed somewhere? I can't even
> find what operators (if any) are able to be used in the raw query string in
> the online docs (maybe there aren't any??). Any help or points in the right
> direction would be appreciated.
> --
> View this message in context:
> http://old.nabble.com/parsing-the-raw-query-string--tp26662578p26662578.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>
>


-- 
"Good Enough" is not good enough.
To give anything less than your best is to sacrifice the gift.
Quality First. Measure Twice. Cut Once.
http://www.israelekpo.com/

Re: parsing the raw query string?

Posted by Erik Hatcher <er...@gmail.com>.
On Dec 6, 2009, at 7:25 AM, regany wrote:
> I've just found solr and am looking at what's involved to work with  
> it. All
> the examples I've seen only ever use 1 word search terms being  
> implemented
> as examples, which doesn't help me trying to see how multiple word  
> queries
> work. It also looks like a hell of a lot of processing needs to be  
> done on
> the raw query string even before you can pass it to solr (in PHP) - is
> everyone processing the query string first and building a custom  
> call to
> solr, or is there a query string parser I've missed somewhere? I  
> can't even
> find what operators (if any) are able to be used in the raw query  
> string in
> the online docs (maybe there aren't any??). Any help or points in  
> the right
> direction would be appreciated.

Are you feeling lucky?  First hit here:

  <http://www.lucidimagination.com/search/p:solr?q=query+parser>