RE: How to index on basis of a condition?

2010-10-26 Thread Ephraim Ofir
:29 PM To: solr-user@lucene.apache.org Subject: Re: How to index on basis of a condition? My Sql is select IF(sub_cat_id=2002, ad_post_date, null) as 'ad_sort_field' from tcuser.ad_details where +---+ | ad_sort_field | +---+ | 2010-05-30| | 2010-05-02

Re: How to index on basis of a condition?

2010-10-26 Thread Pawan Darira
My Sql is select IF(sub_cat_id=2002, ad_post_date, null) as 'ad_sort_field' from tcuser.ad_details where +---+ | ad_sort_field | +---+ | 2010-05-30| | 2010-05-02| | 2010-10-07| | NULL| | 2010-10-15| | NULL| ++ T

Re: How to index on basis of a condition?

2010-10-26 Thread Gora Mohanty
On Tue, Oct 26, 2010 at 3:56 PM, Pawan Darira wrote: > I am using mysql database, and, field type is "date" [...] Could you show us the exact SELECT statement, and some example values returned by running the SELECT directly at a mysql console? Regards, Gora

RE: How to index on basis of a condition?

2010-10-26 Thread Ephraim Ofir
2:26 PM To: solr-user@lucene.apache.org Subject: Re: How to index on basis of a condition? I am using mysql database, and, field type is "date" On Tue, Oct 26, 2010 at 2:56 PM, Gora Mohanty wrote: > On Tue, Oct 26, 2010 at 2:37 PM, Pawan Darira > wrote: > > Thanks Mr. Ep

Re: How to index on basis of a condition?

2010-10-26 Thread Pawan Darira
I am using mysql database, and, field type is "date" On Tue, Oct 26, 2010 at 2:56 PM, Gora Mohanty wrote: > On Tue, Oct 26, 2010 at 2:37 PM, Pawan Darira > wrote: > > Thanks Mr. Ephraim Ofir. I used the SELECT IF() for my requirement. The > > query result is correct. But when i see it in my ind

Re: How to index on basis of a condition?

2010-10-26 Thread Gora Mohanty
On Tue, Oct 26, 2010 at 2:37 PM, Pawan Darira wrote: > Thanks Mr. Ephraim Ofir. I used the SELECT IF() for my requirement. The > query result is correct. But when i see it in my index, the value stored is > something unusual bunch of characters e.g. "*...@6628ad5a"* [...] Which database are you i

Re: How to index on basis of a condition?

2010-10-26 Thread Pawan Darira
> Ephraim Ofir > > -Original Message- > From: Jan Høydahl / Cominvent [mailto:jan@cominvent.com] > Sent: Monday, October 25, 2010 10:23 AM > To: solr-user@lucene.apache.org > Subject: Re: How to index on basis of a condition? > > Do you want to use a field&#

RE: How to index on basis of a condition?

2010-10-25 Thread Ephraim Ofir
ent [mailto:jan@cominvent.com] Sent: Monday, October 25, 2010 10:23 AM To: solr-user@lucene.apache.org Subject: Re: How to index on basis of a condition? Do you want to use a field's content do decide whether the document should be indexed or not? You could write an UpdateProcessor for that,

Re: How to index on basis of a condition?

2010-10-25 Thread Jan Høydahl / Cominvent
Do you want to use a field's content do decide whether the document should be indexed or not? You could write an UpdateProcessor for that, simply aborting the chain for the docs that don't pass your test. @Override public void processAdd(AddUpdateCommand cmd) throws IOException { SolrInputDo

How to index on basis of a condition?

2010-10-24 Thread Pawan Darira
Hi I want to index a particular field on one if() condition. Can i do it through DIH? Please suggest. -- Thanks, Pawan Darira