Thanks ahammad for the quick reply.

As suggested, I am trying out multi core way of implementing the search. I
am trying out the multicore example and getting stuck at an issue. Here is
what I did and the issue I am facing

1) Downloaded 1.4 and started the multicore example using java
-Dsolr.solr.home=multicore -jar start.jar

2) There were 2 files present under example/multicore/exampledocs/ , which I
added to 2 cores respectively. ( Totally 3 docs are present in those 2 files
and all have the word 'ipod' in it )

3) When I query using
http://localhost:8983/solr/core0/select?shards=localhost:8983/solr/core0,localhost:8983/solr/core1&q=*:*I
get all the 3 results.

But when I query using
http://localhost:8983/solr/core0/select?shards=localhost:8983/solr/core0,localhost:8983/solr/core1&q=
*ipod* , I get no results :(

What could be the issue ?

Thanks!


On Fri, Jul 17, 2009 at 7:20 PM, ahammad <ahmed.ham...@gmail.com> wrote:

>
> Hello,
>
> I'm not sure what the best way is to do this, but I have done something
> identical.
>
> I have the same requirements, ie several datasources. I also used SolrJ and
> jsp for this. The way I ended up doing it was to create a multi core
> environment, one core per datasource. When I do a query across several
> datasources, I use shards. Solr automatically returns a "hybrid" result set
> that way, sorted by solr's default scoring.
>
> Faceting comes in the picture when you want to show the number of documents
> per datasource and have the ability to narrow down the result set. The way
> I
> did it was to add a field called "dataSource" to all the documents, and
> injected them with a default value of the data source name (in your case,
> D1, D2 ...). You can do this by adding this in the schema:
>
> <field name="dataSource" type="string" indexed="true" stored="true"
> required="true" default="D1"/>
>
> When you perform a query across multiple datasources, you will use shards.
> Here is an example:
>
>
> http://localhost:8080/solr/core1/select?shards=localhost:8080/solr/core1,localhost:8080/solr/core2&q=some
> query
>
> That will search on both cores 1 and 2.
>
> To facet on the datasource in order to be able to categorize the result
> set,
> you can simply add this snippet to the query:
>
> &facet=on&facet.field=dataSource
>
> This will return the datasources that are defined with their number of
> results for the query.
>
> Making the facet results clickable in order to narrow down the results can
> be achieved by adding a filter to the query and filtering to a specific
> dataSource. I actually ended uo creating a fairly intuitive front-end for
> my
> system with faceting, filtering, paging etc all using jsp and SolrJ. SolrJ
> is powerful enough to handle all of the backend processing.
>
> Good luck!
>
>
>
>
>
>
> joe_coder wrote:
> >
> > I missed adding some size related information in the query above.
> >
> > D1 and D2 would have close to 1 million records each
> > D3 would have ~10 million records.
> >
> > Thanks!
> >
>
> --
> View this message in context:
> http://www.nabble.com/Solr-MultiCore-query-tp24534383p24534793.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>
>

Reply via email to