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 Abhishek tiwari <ab...@gmail.com> on 2012/03/06 13:31:27 UTC

schema design help

i am new in solr  want help in shema design .  i have multiple entities
like Event , Establishments and Movies ..each have different types of
relations.. should i make diffrent core for each entities ?

Re: schema design help

Posted by Gora Mohanty <go...@mimirtech.com>.
On 13 March 2012 18:19, Abhishek tiwari <ab...@gmail.com> wrote:
[...]
> My one more concern,
> Though Establishments, Events, Movies are not related to each other,
>
> I have to make 3 search queries to their independent cores and club the
> data to show, will that effect my relevancy?

Yes, it will. The results from each core will be ranked separately,
and there is no really good way to compare scores between one
core, and another.

> There is movie with title "Striker" and Establishment with title "Striker".
>
> So which one is better:
>
>   - 3 queries to independent cores and clubbing data
>
>
>   - Single query to one core which contains all the data.
[...]

This could depend on a variety of things, such as the size of each
core, etc., so that it is hard to say for sure without actually trying
things out. However, I would imagine that the single query would
be faster in general.

Regards,
Gora

Re: schema design help

Posted by Abhishek tiwari <ab...@gmail.com>.
Hi Gora,
Thanks,

My one more concern,
Though Establishments, Events, Movies are not related to each other,

I have to make 3 search queries to their independent cores and club the
data to show, will that effect my relevancy?
There is movie with title "Striker" and Establishment with title "Striker".

So which one is better:

   - 3 queries to independent cores and clubbing data


   - Single query to one core which contains all the data.

Thanks

Abhishek

On Thu, Mar 8, 2012 at 11:07 AM, Gora Mohanty <go...@mimirtech.com> wrote:

> On 8 March 2012 11:05, Abhishek tiwari <ab...@gmail.com>
> wrote:
> > Gora,
> > we are not having the related search ...
> > like u have mentioned ... * will a search on an Establishment
> > also require results from Movie, such as what movies are showing
> > at the establishment*
> >
> > Establishment doesnot require movie reults .. each enitity has there
> > separate search..
> [...]
>
> In that case, multiple cores should be OK.
>
> Regards,
> Gora
>

Re: schema design help

Posted by Gora Mohanty <go...@mimirtech.com>.
On 8 March 2012 11:05, Abhishek tiwari <ab...@gmail.com> wrote:
> Gora,
> we are not having the related search ...
> like u have mentioned ... * will a search on an Establishment
> also require results from Movie, such as what movies are showing
> at the establishment*
>
> Establishment doesnot require movie reults .. each enitity has there
> separate search..
[...]

In that case, multiple cores should be OK.

Regards,
Gora

Re: schema design help

Posted by Abhishek tiwari <ab...@gmail.com>.
Gora,
we are not having the related search ...
like u have mentioned ... * will a search on an Establishment
also require results from Movie, such as what movies are showing
at the establishment*

Establishment doesnot require movie reults .. each enitity has there
separate search..

On Thu, Mar 8, 2012 at 10:49 AM, Gora Mohanty <go...@mimirtech.com> wrote:

> On 8 March 2012 10:40, Abhishek tiwari <ab...@gmail.com>
> wrote:
> >  my page have layout in following manner
> >  *All tab* :which will contain all entities (Establishment/Event/Movie)
> > Establishment: contain Establishment search results
> > Event tab : will contain Event search results
> > Movie tab : will contain Movie search results
> >
> > please suggest me how to design my schema ?
> [...]
>
> You will need to think more about your search requirements, and
> provide more details. E.g., will a search on an Establishment
> also require results from Movie, such as what movies are showing
> at the establishment? Similarly, will results from an Event search
> require a list of Movies showing at the events? As Solr is not a
> RDBMS, if you need such correlated data, you should typically use
> a single, flat index, rather than multiple cores.
>
> IMHO, a multi-core setup would be unusual for what you are
> trying to do. However, this is difficult to say for sure without an
> insight into your search requirements.
>
> Regards,
> Gora
>

Re: schema design help

Posted by Gora Mohanty <go...@mimirtech.com>.
On 8 March 2012 10:40, Abhishek tiwari <ab...@gmail.com> wrote:
>  my page have layout in following manner
>  *All tab* :which will contain all entities (Establishment/Event/Movie)
> Establishment: contain Establishment search results
> Event tab : will contain Event search results
> Movie tab : will contain Movie search results
>
> please suggest me how to design my schema ?
[...]

You will need to think more about your search requirements, and
provide more details. E.g., will a search on an Establishment
also require results from Movie, such as what movies are showing
at the establishment? Similarly, will results from an Event search
require a list of Movies showing at the events? As Solr is not a
RDBMS, if you need such correlated data, you should typically use
a single, flat index, rather than multiple cores.

IMHO, a multi-core setup would be unusual for what you are
trying to do. However, this is difficult to say for sure without an
insight into your search requirements.

Regards,
Gora

Re: schema design help

Posted by Abhishek tiwari <ab...@gmail.com>.
 my page have layout in following manner
 *All tab* :which will contain all entities (Establishment/Event/Movie)
Establishment: contain Establishment search results
Event tab : will contain Event search results
Movie tab : will contain Movie search results

please suggest me how to design my schema ?


On Thu, Mar 8, 2012 at 10:21 AM, Walter Underwood <wu...@wunderwood.org>wrote:

> You should create multiple cores when each core is an independent search.
> If you have three separate search pages, you may want three separate cores.
>
> wunder
> Search Guy, Chegg.com
>
> On Mar 7, 2012, at 8:48 PM, Abhishek tiwari wrote:
>
> > please  suggest me when one should  create multiple core..?
> >
> > On Thu, Mar 8, 2012 at 12:12 AM, Walter Underwood <wunder@wunderwood.org
> >wrote:
> >
> >> Solr is not relational, so you will probably need to take a fresh look
> at
> >> your data.
> >>
> >> Here is one method.
> >>
> >> 1. Sketch your search results page.
> >> 2. Each result is a document in Solr.
> >> 3. Each displayed item is a stored field in Solr.
> >> 4. Each searched item is an indexed field in Solr.
> >>
> >> It may help to think of this as a big flat materialized view in your
> DBMS.
> >>
> >> wunder
> >> Search Guy, Chegg.com
> >>
> >> On Mar 6, 2012, at 10:56 PM, Abhishek tiwari wrote:
> >>
> >>> thanks for replying ..
> >>>
> >>> In our RDBMS schema we have Establishment/Event/Movie master relations.
> >>> Establishment has title ,description , ratings,  tags, cuisines
> >>> (multivalued), services (multivalued) and features  (multivalued) like
> >>> fields..similarly in Event title, description, category(multivalued)
>  and
> >>> venue(multivalued) ..fields..and in movies name,start date and end date
> >>> ,genre, theater ,rating , review  like fields ..
> >>>
> >>> we are having nearly 1 M data in each entity and movie and event expire
> >>> frequently ....and we have to update on expire ....
> >>> we are having the data additional to index data ( stored data)  to
> reduce
> >>> RDBMS query..
> >>>
> >>> please suggest me how to proceed for schema design.. single core or
> >>> multiple core for each entity?
> >>>
> >>>
> >>> On Tue, Mar 6, 2012 at 7:40 PM, Gora Mohanty <go...@mimirtech.com>
> wrote:
> >>>
> >>>> On 6 March 2012 18:01, Abhishek tiwari <abhishek.tiwari.tek@gmail.com
> >
> >>>> wrote:
> >>>>> i am new in solr  want help in shema design .  i have multiple
> entities
> >>>>> like Event , Establishments and Movies ..each have different types of
> >>>>> relations.. should i make diffrent core for each entities ?
> >>>>
> >>>> It depends on your use case, i.e., what would your typical searches
> >>>> be on. Normally, using a separate core for each entity would be
> >>>> unusual, and instead one would flatten out typical RDBMS data for
> >>>> Solr.
> >>>>
> >>>> Please describe what you want to achieve, and people might be
> >>>> better able to help you.
> >>>>
> >>>> Regards,
> >>>> Gora
> >>>>
>
>
>
>
>

Re: schema design help

Posted by Walter Underwood <wu...@wunderwood.org>.
You should create multiple cores when each core is an independent search. If you have three separate search pages, you may want three separate cores.

wunder
Search Guy, Chegg.com

On Mar 7, 2012, at 8:48 PM, Abhishek tiwari wrote:

> please  suggest me when one should  create multiple core..?
> 
> On Thu, Mar 8, 2012 at 12:12 AM, Walter Underwood <wu...@wunderwood.org>wrote:
> 
>> Solr is not relational, so you will probably need to take a fresh look at
>> your data.
>> 
>> Here is one method.
>> 
>> 1. Sketch your search results page.
>> 2. Each result is a document in Solr.
>> 3. Each displayed item is a stored field in Solr.
>> 4. Each searched item is an indexed field in Solr.
>> 
>> It may help to think of this as a big flat materialized view in your DBMS.
>> 
>> wunder
>> Search Guy, Chegg.com
>> 
>> On Mar 6, 2012, at 10:56 PM, Abhishek tiwari wrote:
>> 
>>> thanks for replying ..
>>> 
>>> In our RDBMS schema we have Establishment/Event/Movie master relations.
>>> Establishment has title ,description , ratings,  tags, cuisines
>>> (multivalued), services (multivalued) and features  (multivalued) like
>>> fields..similarly in Event title, description, category(multivalued)  and
>>> venue(multivalued) ..fields..and in movies name,start date and end date
>>> ,genre, theater ,rating , review  like fields ..
>>> 
>>> we are having nearly 1 M data in each entity and movie and event expire
>>> frequently ....and we have to update on expire ....
>>> we are having the data additional to index data ( stored data)  to reduce
>>> RDBMS query..
>>> 
>>> please suggest me how to proceed for schema design.. single core or
>>> multiple core for each entity?
>>> 
>>> 
>>> On Tue, Mar 6, 2012 at 7:40 PM, Gora Mohanty <go...@mimirtech.com> wrote:
>>> 
>>>> On 6 March 2012 18:01, Abhishek tiwari <ab...@gmail.com>
>>>> wrote:
>>>>> i am new in solr  want help in shema design .  i have multiple entities
>>>>> like Event , Establishments and Movies ..each have different types of
>>>>> relations.. should i make diffrent core for each entities ?
>>>> 
>>>> It depends on your use case, i.e., what would your typical searches
>>>> be on. Normally, using a separate core for each entity would be
>>>> unusual, and instead one would flatten out typical RDBMS data for
>>>> Solr.
>>>> 
>>>> Please describe what you want to achieve, and people might be
>>>> better able to help you.
>>>> 
>>>> Regards,
>>>> Gora
>>>> 





Re: schema design help

Posted by Abhishek tiwari <ab...@gmail.com>.
please  suggest me when one should  create multiple core..?

On Thu, Mar 8, 2012 at 12:12 AM, Walter Underwood <wu...@wunderwood.org>wrote:

> Solr is not relational, so you will probably need to take a fresh look at
> your data.
>
> Here is one method.
>
> 1. Sketch your search results page.
> 2. Each result is a document in Solr.
> 3. Each displayed item is a stored field in Solr.
> 4. Each searched item is an indexed field in Solr.
>
> It may help to think of this as a big flat materialized view in your DBMS.
>
> wunder
> Search Guy, Chegg.com
>
> On Mar 6, 2012, at 10:56 PM, Abhishek tiwari wrote:
>
> > thanks for replying ..
> >
> > In our RDBMS schema we have Establishment/Event/Movie master relations.
> > Establishment has title ,description , ratings,  tags, cuisines
> > (multivalued), services (multivalued) and features  (multivalued) like
> > fields..similarly in Event title, description, category(multivalued)  and
> > venue(multivalued) ..fields..and in movies name,start date and end date
> > ,genre, theater ,rating , review  like fields ..
> >
> >  we are having nearly 1 M data in each entity and movie and event expire
> > frequently ....and we have to update on expire ....
> > we are having the data additional to index data ( stored data)  to reduce
> > RDBMS query..
> >
> > please suggest me how to proceed for schema design.. single core or
> > multiple core for each entity?
> >
> >
> > On Tue, Mar 6, 2012 at 7:40 PM, Gora Mohanty <go...@mimirtech.com> wrote:
> >
> >> On 6 March 2012 18:01, Abhishek tiwari <ab...@gmail.com>
> >> wrote:
> >>> i am new in solr  want help in shema design .  i have multiple entities
> >>> like Event , Establishments and Movies ..each have different types of
> >>> relations.. should i make diffrent core for each entities ?
> >>
> >> It depends on your use case, i.e., what would your typical searches
> >> be on. Normally, using a separate core for each entity would be
> >> unusual, and instead one would flatten out typical RDBMS data for
> >> Solr.
> >>
> >> Please describe what you want to achieve, and people might be
> >> better able to help you.
> >>
> >> Regards,
> >> Gora
> >>
>
>
>
>
>
>

Re: schema design help

Posted by Walter Underwood <wu...@wunderwood.org>.
Solr is not relational, so you will probably need to take a fresh look at your data.

Here is one method.

1. Sketch your search results page.
2. Each result is a document in Solr.
3. Each displayed item is a stored field in Solr.
4. Each searched item is an indexed field in Solr.

It may help to think of this as a big flat materialized view in your DBMS.

wunder
Search Guy, Chegg.com

On Mar 6, 2012, at 10:56 PM, Abhishek tiwari wrote:

> thanks for replying ..
> 
> In our RDBMS schema we have Establishment/Event/Movie master relations.
> Establishment has title ,description , ratings,  tags, cuisines
> (multivalued), services (multivalued) and features  (multivalued) like
> fields..similarly in Event title, description, category(multivalued)  and
> venue(multivalued) ..fields..and in movies name,start date and end date
> ,genre, theater ,rating , review  like fields ..
> 
>  we are having nearly 1 M data in each entity and movie and event expire
> frequently ....and we have to update on expire ....
> we are having the data additional to index data ( stored data)  to reduce
> RDBMS query..
> 
> please suggest me how to proceed for schema design.. single core or
> multiple core for each entity?
> 
> 
> On Tue, Mar 6, 2012 at 7:40 PM, Gora Mohanty <go...@mimirtech.com> wrote:
> 
>> On 6 March 2012 18:01, Abhishek tiwari <ab...@gmail.com>
>> wrote:
>>> i am new in solr  want help in shema design .  i have multiple entities
>>> like Event , Establishments and Movies ..each have different types of
>>> relations.. should i make diffrent core for each entities ?
>> 
>> It depends on your use case, i.e., what would your typical searches
>> be on. Normally, using a separate core for each entity would be
>> unusual, and instead one would flatten out typical RDBMS data for
>> Solr.
>> 
>> Please describe what you want to achieve, and people might be
>> better able to help you.
>> 
>> Regards,
>> Gora
>> 






Re: schema design help

Posted by Willem Basson <wi...@gmail.com>.
I would say do both. If you have the capacity create a core for each and
one that combines it and do some tests.
There are pros and cons to both approaches. If you ever need joins in RDBMS
terms then you probably want one index.
If not then one index might still be a lot easier.
The only real reason to start splitting is if you hit resource constraints,
memory etc.
And then multiple cores won't necessarily solve the problems either.
Build one big index and see how it performs.


On Wed, Mar 7, 2012 at 6:56 AM, Abhishek tiwari <
abhishek.tiwari.tek@gmail.com> wrote:

> thanks for replying ..
>
> In our RDBMS schema we have Establishment/Event/Movie master relations.
> Establishment has title ,description , ratings,  tags, cuisines
> (multivalued), services (multivalued) and features  (multivalued) like
> fields..similarly in Event title, description, category(multivalued)  and
> venue(multivalued) ..fields..and in movies name,start date and end date
> ,genre, theater ,rating , review  like fields ..
>
>  we are having nearly 1 M data in each entity and movie and event expire
> frequently ....and we have to update on expire ....
> we are having the data additional to index data ( stored data)  to reduce
> RDBMS query..
>
> please suggest me how to proceed for schema design.. single core or
> multiple core for each entity?
>
>
> On Tue, Mar 6, 2012 at 7:40 PM, Gora Mohanty <go...@mimirtech.com> wrote:
>
> > On 6 March 2012 18:01, Abhishek tiwari <ab...@gmail.com>
> > wrote:
> > > i am new in solr  want help in shema design .  i have multiple entities
> > > like Event , Establishments and Movies ..each have different types of
> > > relations.. should i make diffrent core for each entities ?
> >
> > It depends on your use case, i.e., what would your typical searches
> > be on. Normally, using a separate core for each entity would be
> > unusual, and instead one would flatten out typical RDBMS data for
> > Solr.
> >
> > Please describe what you want to achieve, and people might be
> > better able to help you.
> >
> > Regards,
> > Gora
> >
>



-- 
Willem Basson

Re: schema design help

Posted by Abhishek tiwari <ab...@gmail.com>.
thanks for replying ..

In our RDBMS schema we have Establishment/Event/Movie master relations.
Establishment has title ,description , ratings,  tags, cuisines
(multivalued), services (multivalued) and features  (multivalued) like
fields..similarly in Event title, description, category(multivalued)  and
venue(multivalued) ..fields..and in movies name,start date and end date
,genre, theater ,rating , review  like fields ..

  we are having nearly 1 M data in each entity and movie and event expire
frequently ....and we have to update on expire ....
we are having the data additional to index data ( stored data)  to reduce
RDBMS query..

please suggest me how to proceed for schema design.. single core or
multiple core for each entity?


On Tue, Mar 6, 2012 at 7:40 PM, Gora Mohanty <go...@mimirtech.com> wrote:

> On 6 March 2012 18:01, Abhishek tiwari <ab...@gmail.com>
> wrote:
> > i am new in solr  want help in shema design .  i have multiple entities
> > like Event , Establishments and Movies ..each have different types of
> > relations.. should i make diffrent core for each entities ?
>
> It depends on your use case, i.e., what would your typical searches
> be on. Normally, using a separate core for each entity would be
> unusual, and instead one would flatten out typical RDBMS data for
> Solr.
>
> Please describe what you want to achieve, and people might be
> better able to help you.
>
> Regards,
> Gora
>

Re: schema design help

Posted by Gora Mohanty <go...@mimirtech.com>.
On 6 March 2012 18:01, Abhishek tiwari <ab...@gmail.com> wrote:
> i am new in solr  want help in shema design .  i have multiple entities
> like Event , Establishments and Movies ..each have different types of
> relations.. should i make diffrent core for each entities ?

It depends on your use case, i.e., what would your typical searches
be on. Normally, using a separate core for each entity would be
unusual, and instead one would flatten out typical RDBMS data for
Solr.

Please describe what you want to achieve, and people might be
better able to help you.

Regards,
Gora