Getting Category ID (primary key)

2011-03-11 Thread Prav Buz
Hi,

I need to show a facets on Category and then I need the category id in the
href link. For this what I 'm trying to do is create a field which will
store ID|Category in the schema and split it in the UI.
Also I have Category and category id 's indexed .

Categories are multivalued as well, means there will be more than one
category for one document.


Is there any better way to do this? Has anyone gone thru this before?

Thanks

Praveen


Re: Getting Category ID (primary key)

2011-03-11 Thread Prav Buz
Hi,

Yes I already have different fields for category and category Id , and they
are in same order when retrieved from solr

for eg:
IDs
1
3
4
5
names
a
b
c
d
e

id 1 is of name a and id 5 is of name e. but when I sort the category names
, looses this order as they are not related in any manner in the solr docs.


Thanks

Praveen

On Fri, Mar 11, 2011 at 2:35 PM, Gora Mohanty  wrote:

> On Fri, Mar 11, 2011 at 2:32 PM, Prav Buz  wrote:
> [...]
> > I need to show a facets on Category and then I need the category id in
> the
> > href link. For this what I 'm trying to do is create a field which will
> > store ID|Category in the schema and split it in the UI.
> > Also I have Category and category id 's indexed .
> [...]
>
> Why not have two different fields for category, and for category ID?
>
> Regards,
> Gora
>


Re: Getting Category ID (primary key)

2011-03-11 Thread Prav Buz
Hi,
Thanks Erik, yes that's what I've done for now, but was wondering if it's
the best way :)

thanks

Praveen

On Fri, Mar 11, 2011 at 6:06 PM, Erick Erickson wrote:

> Thinking out loud here, but would it work to just have ugly
> categories? Instead of splitting them up, just encode them like
> 1|a
> 2|b
> 3|c
>
> or some such. Then split them  back up again and display
> the name to the user and use the ID in the URL
>
> Best
> Erick
>
> On Fri, Mar 11, 2011 at 4:17 AM, Prav Buz  wrote:
> > Hi,
> >
> > Yes I already have different fields for category and category Id , and
> they
> > are in same order when retrieved from solr
> >
> > for eg:
> > IDs
> > 1
> > 3
> > 4
> > 5
> > names
> > a
> > b
> > c
> > d
> > e
> >
> > id 1 is of name a and id 5 is of name e. but when I sort the category
> names
> > , looses this order as they are not related in any manner in the solr
> docs.
> >
> >
> > Thanks
> >
> > Praveen
> >
> > On Fri, Mar 11, 2011 at 2:35 PM, Gora Mohanty 
> wrote:
> >
> >> On Fri, Mar 11, 2011 at 2:32 PM, Prav Buz  wrote:
> >> [...]
> >> > I need to show a facets on Category and then I need the category id in
> >> the
> >> > href link. For this what I 'm trying to do is create a field which
> will
> >> > store ID|Category in the schema and split it in the UI.
> >> > Also I have Category and category id 's indexed .
> >> [...]
> >>
> >> Why not have two different fields for category, and for category ID?
> >>
> >> Regards,
> >> Gora
> >>
> >
>


Re: Getting Category ID (primary key)

2011-03-11 Thread Prav Buz
Hi,

Thanks for your suggestions, thanks to the great community too :)

regards
Praveen

On Fri, Mar 11, 2011 at 11:01 PM, Geert-Jan Brits  wrote:

> If it works, it's performant and not too messy it's a good way :-) . You
> can
> also consider just faceting on Id, and use the id to fetch the categoryname
> through sql / nosql.
> That way your logic is seperated from your presentation, which makes
> extending (think internationalizing, etc.) easier. Not sure if that's
> appropriate for your 'category' field but anyway.
>
> I belief you were asking this because you already had 2 multivalued fields:
>  'id' and 'category' which you wanted to reuse for this particular
> use-case.
> In short: you can't link a particular value in a multivalued field (e.g:
> 'id') to a particular value in another multivalued field (e.g: 'category'),
> so just give up this route, and go with what you had, or use the suggested
> above.
>
> hth,
> Geert-Jan
>
>
>
> 2011/3/11 Prav Buz 
>
> > Hi,
> > Thanks Erik, yes that's what I've done for now, but was wondering if it's
> > the best way :)
> >
> > thanks
> >
> > Praveen
> >
> > On Fri, Mar 11, 2011 at 6:06 PM, Erick Erickson  > >wrote:
> >
> > > Thinking out loud here, but would it work to just have ugly
> > > categories? Instead of splitting them up, just encode them like
> > > 1|a
> > > 2|b
> > > 3|c
> > >
> > > or some such. Then split them  back up again and display
> > > the name to the user and use the ID in the URL
> > >
> > > Best
> > > Erick
> > >
> > > On Fri, Mar 11, 2011 at 4:17 AM, Prav Buz  wrote:
> > > > Hi,
> > > >
> > > > Yes I already have different fields for category and category Id ,
> and
> > > they
> > > > are in same order when retrieved from solr
> > > >
> > > > for eg:
> > > > IDs
> > > > 1
> > > > 3
> > > > 4
> > > > 5
> > > > names
> > > > a
> > > > b
> > > > c
> > > > d
> > > > e
> > > >
> > > > id 1 is of name a and id 5 is of name e. but when I sort the category
> > > names
> > > > , looses this order as they are not related in any manner in the solr
> > > docs.
> > > >
> > > >
> > > > Thanks
> > > >
> > > > Praveen
> > > >
> > > > On Fri, Mar 11, 2011 at 2:35 PM, Gora Mohanty 
> > > wrote:
> > > >
> > > >> On Fri, Mar 11, 2011 at 2:32 PM, Prav Buz 
> wrote:
> > > >> [...]
> > > >> > I need to show a facets on Category and then I need the category
> id
> > in
> > > >> the
> > > >> > href link. For this what I 'm trying to do is create a field which
> > > will
> > > >> > store ID|Category in the schema and split it in the UI.
> > > >> > Also I have Category and category id 's indexed .
> > > >> [...]
> > > >>
> > > >> Why not have two different fields for category, and for category ID?
> > > >>
> > > >> Regards,
> > > >> Gora
> > > >>
> > > >
> > >
> >
>


frequent index updates

2011-03-21 Thread Prav Buz
Hi,

I'm wondering what are the best way to do this for this scenario:

Index will have about 250 - 400 million items. Index needs to be updated
every 10/20 minutes and no. of records updated could be upto 5-6 million in
each.

Could you please guide me on how the indexing is done when there are above
500 millions of records  and what are the possible ways to do such frequent
updates mentioned above.


thanks

Prav


Multiple terms in query

2011-04-01 Thread Prav Buz
Hi,

When I search multiple terms in solr query , though I get all the results
containing either of the terms , but the results which contain both terms
are outranked by the others. For example:

Panasonic Camera

most of the top results are those which contain "Panasonic" ,  and they are
of accessories rather than a camera. but when I search Panasonic Camera^16 I
get what I want.

What's the correct method of doing this? that is when multiple terms are
searched , how to make sure , records contain all the terms shown first in
solr?


thanks & regards

Prav.