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 Fergus McMenemie <fe...@twig.me.uk> on 2009/04/15 17:18:21 UTC

looking at the results of a distributed search using shards.

Hi,

Having all kinds of fun with distributed search using shards:-)

I have 30K documents indexed using DIH into an index. Another
index contain documents indexed using solr-cell. I am using shards
to search across both indexes.
 
I am trying to format the results returned from solr such the
source document can be linked to, and to do so I think I need to
know which shard a particular result came from. Is this a FAQ?

Regards
-- 

===============================================================
Fergus McMenemie               Email:fergus@twig.me.uk
Techmore Ltd                   Phone:(UK) 07721 376021

Unix/Mac/Intranets             Analyst Programmer
===============================================================

Re: looking at the results of a distributed search using shards.

Posted by Fergus McMenemie <fe...@twig.me.uk>.

>Ain't a FAQ, but could be.  Look at JIRA and search for Brian, who made the same request a few months ago.
>I've often wondered if we could add info about the source shard, as well as whether a hit came from cache or not.

+1 for that. was it Solr-303?

Taking things one step further, imagine you have a variable
number of shards and you are constructing a GUI to search
across them all. It would be nice if your GUI had a simple
means of listing the different shards by a name or label
along with a description. The user could then select the
shards/sources he/she wanted to include/exclude from the
search. 

How do Lucid arrange the checkboxes down the side of their 
search page? Is it one index or different shards for the
different types of content?

I would like some means of adding a label and description
to each solr index that I can easily access and show to
uses when constructing search forms.

My solr.xml is as follows:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<solr sharedLib="lib" persistent="true">
   <cores adminPath="/admin/cores">
      <core default="true"  instanceDir="../solrsearch"           name="search">
         <!-- this index will *never* contain any docs -->
         <property name="solr.data.dir" value="solrsearch/data" />
         </core>
      <core default="true"  instanceDir="../solrgaz"           name="gaz">
         <property name="solr.data.dir" value="solrgaz/data" />
         <property name="shardname" value="gaz" />
         </core>
      <core default="false" instanceDir="../solrford" name="docs">
         <property name="solr.data.dir" value="solrford/data" />
         <property name="shardname" value="forddocs" />
         </core>
      <core default="false" instanceDir="../solrfactbook" name="facts">
         <property name="solr.data.dir" value="solrfactbook/data" />
         <property name="shardname" value="facts" />
         </core>
      </cores>
   </solr>

Then each schema.xml contains:
      <field name="shardname" type="string" indexed="false" stored="true" default="${shardname:unknown}" /> 
which works fine, but hey...

    the schema.xml already has a name attribute, why cant I use it?
    do I need the over head of carrying an extra field for every document?
    another search engine had "global" or "constant" fields which were added to the index when it was created and were available within each search result.


>
> Otis
>--
>Sematext -- http://sematext.com/ -- Lucene - Solr - Nutch
>
>
>
>----- Original Message ----
>> From: Fergus McMenemie <fe...@twig.me.uk>
>> To: solr-user@lucene.apache.org
>> Sent: Wednesday, April 15, 2009 11:18:21 AM
>> Subject: looking at the results of a distributed search using shards.
>> 
>> Hi,
>> 
>> Having all kinds of fun with distributed search using shards:-)
>> 
>> I have 30K documents indexed using DIH into an index. Another
>> index contain documents indexed using solr-cell. I am using shards
>> to search across both indexes.
>> 
>> I am trying to format the results returned from solr such the
>> source document can be linked to, and to do so I think I need to
>> know which shard a particular result came from. Is this a FAQ?
>> 
>> Regards
>> -- 
>> 
>> ===============================================================
>> Fergus McMenemie               Email:fergus@twig.me.uk
>> Techmore Ltd                   Phone:(UK) 07721 376021
>> 
>> Unix/Mac/Intranets             Analyst Programmer
>> ===============================================================

-- 

===============================================================
Fergus McMenemie               Email:fergus@twig.me.uk
Techmore Ltd                   Phone:(UK) 07721 376021

Unix/Mac/Intranets             Analyst Programmer
===============================================================

Re: looking at the results of a distributed search using shards.

Posted by Otis Gospodnetic <ot...@yahoo.com>.
Ain't a FAQ, but could be.  Look at JIRA and search for Brian, who made the same request a few months ago.
I've often wondered if we could add info about the source shard, as well as whether a hit came from cache or not.

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



----- Original Message ----
> From: Fergus McMenemie <fe...@twig.me.uk>
> To: solr-user@lucene.apache.org
> Sent: Wednesday, April 15, 2009 11:18:21 AM
> Subject: looking at the results of a distributed search using shards.
> 
> Hi,
> 
> Having all kinds of fun with distributed search using shards:-)
> 
> I have 30K documents indexed using DIH into an index. Another
> index contain documents indexed using solr-cell. I am using shards
> to search across both indexes.
> 
> I am trying to format the results returned from solr such the
> source document can be linked to, and to do so I think I need to
> know which shard a particular result came from. Is this a FAQ?
> 
> Regards
> -- 
> 
> ===============================================================
> Fergus McMenemie               Email:fergus@twig.me.uk
> Techmore Ltd                   Phone:(UK) 07721 376021
> 
> Unix/Mac/Intranets             Analyst Programmer
> ===============================================================


Re: looking at the results of a distributed search using shards.

Posted by Fergus McMenemie <fe...@twig.me.uk>.
>On Apr 15, 2009, at 11:18 AM, Fergus McMenemie wrote:
>
>> Hi,
>>
>> Having all kinds of fun with distributed search using shards:-)
>>
>> I have 30K documents indexed using DIH into an index. Another
>> index contain documents indexed using solr-cell. I am using shards
>> to search across both indexes.
>>
>> I am trying to format the results returned from solr such the
>> source document can be linked to, and to do so I think I need to
>> know which shard a particular result came from. Is this a FAQ?
>
>+1, assuming you mean to add it as a FAQ and aren't asking if it  
>already is one.

I was asking.. how do I find out which shard a result came from.
But I felt it must be a FAQ! Again... I am wondering if there is
established best practice covering this sort of thing, before I
go and roll my own:-)


Fergus.
>
>--------------------------
>Grant Ingersoll
>http://www.lucidimagination.com/
>
>Search the Lucene ecosystem (Lucene/Solr/Nutch/Mahout/Tika/Droids)  
>using Solr/Lucene:
>http://www.lucidimagination.com/search

-- 

===============================================================
Fergus McMenemie               Email:fergus@twig.me.uk
Techmore Ltd                   Phone:(UK) 07721 376021

Unix/Mac/Intranets             Analyst Programmer
===============================================================

Re: looking at the results of a distributed search using shards.

Posted by Grant Ingersoll <gs...@apache.org>.
On Apr 15, 2009, at 11:18 AM, Fergus McMenemie wrote:

> Hi,
>
> Having all kinds of fun with distributed search using shards:-)
>
> I have 30K documents indexed using DIH into an index. Another
> index contain documents indexed using solr-cell. I am using shards
> to search across both indexes.
>
> I am trying to format the results returned from solr such the
> source document can be linked to, and to do so I think I need to
> know which shard a particular result came from. Is this a FAQ?

+1, assuming you mean to add it as a FAQ and aren't asking if it  
already is one.

>
>
> Regards
> -- 
>
> ===============================================================
> Fergus McMenemie               Email:fergus@twig.me.uk
> Techmore Ltd                   Phone:(UK) 07721 376021
>
> Unix/Mac/Intranets             Analyst Programmer
> ===============================================================

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

Search the Lucene ecosystem (Lucene/Solr/Nutch/Mahout/Tika/Droids)  
using Solr/Lucene:
http://www.lucidimagination.com/search