Re: parsing the raw query string?

2009-12-06 Thread Israel Ekpo
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: Grouping

2009-12-06 Thread Martijn v Groningen
Field collapsing has some aggregation functions like sum() and avg(),
but the statistics are computed based on collapse groups instead of
all documents with the same field value. A collapse group contains
documents that were not relevant enough to end up (collapsed
documents) in the search result and one or more documents that are
relevant for the current search result, that are being displayed in
the search result. This number is controlled by the collapse.threshold
parameter, that defaults to one.

The statistics are calculated based on the collapsed documents, so it
is not exactly the same as a sql group by. You can however get similar
results when the collapse.threshold is one and add the field value
(e.g. price) of the most relevant document to the aggregated
statistic. Off course you will have to this yourself on the client
side. Hope this clarifies the field collapse functionality a bit.

Martijn

2009/12/4 Otis Gospodnetic otis_gospodne...@yahoo.com:
 Not out of the box.  You could group by using SOLR-236 perhaps?

 Otis
 --
 Sematext -- http://sematext.com/ -- Solr - Lucene - Nutch



 - Original Message 
 From: Bruno brun...@gmail.com
 To: solr-user@lucene.apache.org
 Sent: Fri, December 4, 2009 1:08:59 PM
 Subject: Grouping

 Is there a way to make a group by or distinct query?

 --
 Bruno Morelli Vargas
 Mail: brun...@gmail.com
 Msn: brun...@hotmail.com
 Icq: 165055101
 Skype: morellibmv




Re: parsing the raw query string?

2009-12-06 Thread Erik Hatcher


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




Re: Embedded for write, HTTP for read - cache aging

2009-12-06 Thread Erik Hatcher


On Dec 5, 2009, at 12:56 PM, Peter 4U wrote:
Does anyone know of a way to tell an http SolrServer to reload its  
back-end index (mark cache as dirty) periodically?


Send a commit/ to the HTTP SolrServer.

I have a scenario where an EmbeddedSolrServer is used for writing  
(for fast indexing), and an


CommonsHttpSolrServer for reading (for remote access).


I'm curious, now much faster is it in your situation?

Erik



Multiple Solr Instances - Multiple Jetty Instances

2009-12-06 Thread Amit Nithian
This may be a silly question but is there any capacity gain if I run
multiple jetty instances each having their own SOLR_HOME where each jetty
instance/solr will replicate their index from a separate cluster of masters?
I have a couple powerful multi-core servers and am not sure if/how a single
JVM takes advantage of multi-cores and feel that I could increase my
resource usage and hence search capacity by running multiple jetty instances
per server as opposed to adding more machines.

Physical redundancy aside, is this acceptable practice?

Thanks!
Amit


Spellchecking - Is there a way to do this?

2009-12-06 Thread Germán Biozzoli
Hello everybody

1. Have tons of digitalized text with the logical errors in OCR process
2. Have indexed with Solr and is working OK.
3. Have added spellchecker index-based for words and phrases with the
hope to offer suggestions with suspicious possible new query
expressions, or related query expressions to the actual one with the
intention to find documents that have the original expression but
contains OCR errors (the user originally have search for state and
democracy and the interface will offer stete and demcraci as an
alternate query expression)

My first problem appears because I need suggestions inclusive when the
expression has returned results. It's seems that only appear
suggestions when there are no results. Is there a way to do so?

The second question is: For the purposes that I've mentioned, is the
best way to use spellchecker or mlt component? Or some other (as a
fuzzy query)?

Thanks a lot
German


Converting java date to solr date and querying dates

2009-12-06 Thread Rakhi Khatwani
Hi,
 i am using solrj
  i want to store dates into a date field called publish date in solr.
how do we do it using solrj
  likewise how do we query from solr using java date? do we always have
to convert it into UTC field and then query it?
  How do i query solr for documents published on monday or for documents
published on March etc.
  or in that case even apply range queries on it??
Regards
Raakhi