Re: Determining core name from a result?

2010-12-17 Thread Lance Norskog
A core is a Solr-controlled Lucene index.

A shard is a core that one part of a distributed search. Shards:
SHOULD have the same schema; you will be so sorry if you don't follow this
MUST have the same unique id field,
MUST be disjoint: no document can be in two different shards

On Thu, Dec 16, 2010 at 8:04 AM, Mark Allan mark.al...@ed.ac.uk wrote:
 Oops! Sorry, I thought shard and core were one in the same and the terms
 could be used interchangeably - I've got a multicore setup which I'm able to
 search across by using the shards parameter.  I think you're right, that
 *is* the question I was asking.

 Thanks for letting me know it's not supported yet.  I guess the easiest
 thing for me to do right now is to add another field in each document saying
 which core it was inserted into.

 Thanks again
 Mark

 On 16 Dec 2010, at 3:46 pm, Chris Hostetter wrote:

 : Subject: Determining core name from a result?

 FYI: some people may be confused because of terminoligy -- i think what
 you are asking is how to know which *shard* a document came from when
 doing a distributed search.

 This isn't currently supported, there is an open issue tracking it...

 https://issues.apache.org/jira/browse/SOLR-705

 -Hoss



 --
 The University of Edinburgh is a charitable body, registered in
 Scotland, with registration number SC005336.





-- 
Lance Norskog
goks...@gmail.com


Re: Determining core name from a result?

2010-12-16 Thread Grant Ingersoll
How are you querying the core to begin with?

On Dec 16, 2010, at 6:46 AM, Mark Allan wrote:

 Hi all,
 
 I've been bashing my head against the wall for a few hours now, trying to get 
 mlt (more-like-this) queries working across multiple cores. I've since seen a 
 JIRA issue and documentation saying that multicore doesn't yet support mlt 
 queries.  Oops!
 
 Anyway, to get around this, I was planning to send the mlt query just to the 
 specific core that a particular result came from, but I can't see a way to 
 obtain that information from the results.  If I figure it out by hand, I can 
 get a MLT query to produce similar documents from that core which is probably 
 good enough for the time being.
 
 Does anyone know how, after performing a multi-core search to retrieve a 
 single document, I can then find out which core that result came from?
 
 I'm using Solr branch_3x.
 
 Many thanks
 
 Mark
 
 
 -- 
 The University of Edinburgh is a charitable body, registered in
 Scotland, with registration number SC005336.
 

--
Grant Ingersoll
http://www.lucidimagination.com/



Re: Determining core name from a result?

2010-12-16 Thread Mark Allan

Hi Grant,

Thanks for your reply. I'm using solrj to connect via http, which  
eventually sends this query


http://localhost:8984/solr/core0/select/?q=id:022-80633905version=2start=0rows=1fl=*indent=onshards=localhost:8984/solr/core0,localhost:8984/solr/core1,localhost:8984/solr/core2,localhost:8984/solr/core3,localhost:8984/solr/core4

I subsequently send the MLT query which ends up looking like:

http://localhost:8984/solr/core0/mlt/?q=id:022-80633905version=2start=0rows=5fl=idindent=onmlt.fl=descriptionmlt.match.include=falsemlt.minwl=3mlt.mintf=1mlt.mindf=1localhost:8984/solr/core0,localhost:8984/solr/core1,localhost:8984/solr/core2,localhost:8984/solr/core3,localhost:8984/solr/core4

If I run that query in a browser, the response returned is
response
responseHeader
status0/status
QTime3/QTime
/responseHeader
null name='response'/
/response

Now, because I know the the document with id 022-80633905 went into  
core 1, I get the correct results if I change the first part of the  
URL to http://localhost:8984/solr/core1/mlt but doing so requires my  
app (not just me!) to know which core the result came from.


Thanks
Mark

On 16 Dec 2010, at 1:44 pm, Grant Ingersoll wrote:


How are you querying the core to begin with?

On Dec 16, 2010, at 6:46 AM, Mark Allan wrote:


Hi all,

I've been bashing my head against the wall for a few hours now,  
trying to get mlt (more-like-this) queries working across multiple  
cores. I've since seen a JIRA issue and documentation saying that  
multicore doesn't yet support mlt queries.  Oops!


Anyway, to get around this, I was planning to send the mlt query  
just to the specific core that a particular result came from, but I  
can't see a way to obtain that information from the results.  If I  
figure it out by hand, I can get a MLT query to produce similar  
documents from that core which is probably good enough for the time  
being.


Does anyone know how, after performing a multi-core search to  
retrieve a single document, I can then find out which core that  
result came from?


I'm using Solr branch_3x.

Many thanks

Mark



--
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.



Re: Determining core name from a result?

2010-12-16 Thread Chris Hostetter

: Subject: Determining core name from a result?

FYI: some people may be confused because of terminoligy -- i think what 
you are asking is how to know which *shard* a document came from when 
doing a distributed search.

This isn't currently supported, there is an open issue tracking it...

https://issues.apache.org/jira/browse/SOLR-705

-Hoss


Re: Determining core name from a result?

2010-12-16 Thread Mark Allan
Oops! Sorry, I thought shard and core were one in the same and the  
terms could be used interchangeably - I've got a multicore setup which  
I'm able to search across by using the shards parameter.  I think  
you're right, that *is* the question I was asking.


Thanks for letting me know it's not supported yet.  I guess the  
easiest thing for me to do right now is to add another field in each  
document saying which core it was inserted into.


Thanks again
Mark

On 16 Dec 2010, at 3:46 pm, Chris Hostetter wrote:


: Subject: Determining core name from a result?

FYI: some people may be confused because of terminoligy -- i think  
what

you are asking is how to know which *shard* a document came from when
doing a distributed search.

This isn't currently supported, there is an open issue tracking it...

https://issues.apache.org/jira/browse/SOLR-705

-Hoss




--
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.