restricting a query by a "set" of field values

2013-07-29 Thread Benjamin Ryan
Hi,
   Is it possible to construct a query in SOLR to perform a query 
that is "restricted" to only those documents that have a field value in a 
particular set of values similar to what would be done in POstgres with the SQL 
query:

   SELECT date_deposited FROM stats
   WHERE date BETWEEN '2013-07-01 00:00:00' AND '2013-07-31 
23:59:00'
   AND collection_id IN ()

   In my SOLR schema.xml date_deposited is a TrieDateField and 
collection_id is an IntField

Regards,
   Ben

--
Dr Ben Ryan
Jorum Technical Manager

5.12 Roscoe Building
The University of Manchester
Oxford Road
Manchester
M13 9PL
Tel: 0160 275 6039
E-mail: 
benjamin.r...@manchester.ac.uk
--



Query across multiple shards - key fields have different names

2013-05-02 Thread Benjamin Ryan
Hi,
  Sorry for the basic question - I can't get to the WiKi to find the answer.
  Version Solr 3.3.0
  I have two separate indexes (currently in two cores but can be moved to 
shards)
  One core holds metadata about educational resources, the other usage 
statistics
  They have a common value  named "id" in one core and "search.resourceid" in 
the other core.
  How can I construct a shard query (once I have moved one the cores to a 
different node) so that I can effectively get the statistics for each 
educational resource grouped by each resource?
  This is an offline reporting job that needs to list the usage events for 
educational resources over a time period (the usage events have a date/time 
field.

Regards,
   Ben

--
Dr Ben Ryan
Jorum Technical Manager

5.12 Roscoe Building
The University of Manchester
Oxford Road
Manchester
M13 9PL
Tel: 0160 275 6039
E-mail: 
benjamin.r...@manchester.ac.uk
--



Query mulitiple cores using intermediate core

2013-05-14 Thread Benjamin Ryan
Hi,
I have seen posts etc on how to setup a core that has a merged 
schema and request handlers to enable search across two other cores.
Can anybody give an example of how the request handler in the 
"merged" core is defined so that it will query over the two other shards.
This has been explained here 
(http://stackoverflow.com/questions/2139030/search-multiple-solr-cores-and-return-one-result-set)
 but I cannot work how the shard parameter should be specified (in an 
invariant?).

Regards,
Ben

--
Dr Ben Ryan
Jorum Technical Coordinator (Services)

5.13 Roscoe Building
The University of Manchester
Oxford Road
Manchester
M13 9PL
Tel: 0161 275 0632
E-mail: benjamin.r...@manchester.ac.uk
--



RE: Query mulitiple cores using intermediate core

2013-05-14 Thread Benjamin Ryan
Hi,
Currently 3.3 but I could move to 4.x if needed.

Regards,
Ben

--
Dr Ben Ryan
Jorum Technical Manager

5.12 Roscoe Building
The University of Manchester
Oxford Road
Manchester
M13 9PL
Tel: 0160 275 6039
E-mail: benjamin.r...@manchester.ac.uk
--


-Original Message-
From: Furkan KAMACI [mailto:furkankam...@gmail.com] 
Sent: 14 May 2013 22:01
To: solr-user@lucene.apache.org
Subject: Re: Query mulitiple cores using intermediate core

Which version of Solr do you use?


2013/5/14 Benjamin Ryan 

> Hi,
> I have seen posts etc on how to setup a core that has 
> a merged schema and request handlers to enable search across two other cores.
> Can anybody give an example of how the request handler 
> in the "merged" core is defined so that it will query over the two 
> other shards.
> This has been explained here (
> http://stackoverflow.com/questions/2139030/search-multiple-solr-cores-
> and-return-one-result-set) but I cannot work how the shard parameter 
> should be specified (in an invariant?).
>
> Regards,
> Ben
>
> --
> Dr Ben Ryan
> Jorum Technical Coordinator (Services)
>
> 5.13 Roscoe Building
> The University of Manchester
> Oxford Road
> Manchester
> M13 9PL
> Tel: 0161 275 0632
> E-mail: benjamin.r...@manchester.ac.uk benjamin.r...@manchester.ac.uk>
> --
>
>


Group by multiple fields

2013-06-05 Thread Benjamin Ryan
Hi,
   Is it possible to create a query similar in function to multiple 
SQL group by clauses?
   I have documents that have a single valued fields for host name 
and collection name and would like to group the results by both e.g. a result 
would contain a count of the documents grouped by both fields:

   Hostname1 collection1 456
   Hostname1 collection2 567
   Hostname2 collection1 123
   Hostname2 collection2 789

   This is on Solr 3.3 (could be on 4.x) and both fields are single 
valued with the type:

   
  


  
  
   

   
   

Regards,
   Ben

--
Dr Ben Ryan
Jorum Technical Manager

5.12 Roscoe Building
The University of Manchester
Oxford Road
Manchester
M13 9PL
Tel: 0160 275 6039
E-mail: 
benjamin.r...@manchester.ac.uk
--