Re: Expression Sort in Solr

2012-07-31 Thread Mikhail Khludnev
how exactly?

On Tue, Jul 31, 2012 at 1:19 PM, lavesh  wrote:

> yes i have, its not working as per need
>
>
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/Expression-Sort-in-Solr-tp3998050p3998310.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>



-- 
Sincerely yours
Mikhail Khludnev
Tech Lead
Grid Dynamics


 


Re: Expression Sort in Solr

2012-07-31 Thread lavesh
yes i have, its not working as per need



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Expression-Sort-in-Solr-tp3998050p3998310.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Expression Sort in Solr

2012-07-31 Thread Mikhail Khludnev
Hello,

have you tried http://wiki.apache.org/solr/FunctionQuery/#if ?

On Mon, Jul 30, 2012 at 3:05 PM, lavesh  wrote:

> I am working on solr for search. I required to perform a expression sort
> such
> that :
>
> say str = ((IF AVAILABLE IN (1,2,3),100,IF(AVAILABLE IN (4,5,6),80,100)) +
> IF(PRICE>1000,70,40))
>
> need to order by (if(str>100,40+str/40,33+str/33)+SOMEOTHERCOLUMN) DESC
>
>
>
>
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/Expression-Sort-in-Solr-tp3998050.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>



-- 
Sincerely yours
Mikhail Khludnev
Tech Lead
Grid Dynamics


 


Re: Expression Sort in Solr

2012-07-26 Thread lavesh
Hi

i know we look to create at index time however all values are dynamic

if(exists(query(COUNTRY:(22 33
44)),100,20),INCOME
)

IS NOT WORKING
ALSO I NEED NESTED IF

On Thu, Jul 26, 2012 at 8:48 PM, Erik Hatcher-4 [via Lucene] <
ml-node+s472066n3997464...@n3.nabble.com> wrote:

> How dynamic are those numbers?   If this expression can be computed at
> index time into a "sort_order" field, that'd be best.  Otherwise, if these
> factors are truly dynamic at run-time, look at the function query sorting
> capability here: <
> http://wiki.apache.org/solr/FunctionQuery#Sort_By_Function> and build up
> the expression from there.  I still encourage you to aim towards computing
> as much of this at index-time as possible to minimize the functions (and
> thus caches) you need at query time.
>
> Erik
>
> On Jul 26, 2012, at 03:47 , lavesh wrote:
>
> > am working on solr for search. I required to perform a expression sort
> such
> > that
> >
> > ORDER BY (IF(COUNTRY=1,100,0) +
> IF(AVAILABLE=2,1000,IF(AVAILABLE=1,60,0)) +
> > IF (DELIVERYIN IN (5,6,7),100,IF (DELIVERYIN IN (80,90),50,0))) DESC
> >
> > can anyone tell me hows is this possible?
> >
> >
> >
> > --
> > View this message in context:
> http://lucene.472066.n3.nabble.com/Expression-Sort-in-Solr-tp3997369.html
> > Sent from the Solr - User mailing list archive at Nabble.com.
>
>
>
> --
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://lucene.472066.n3.nabble.com/Expression-Sort-in-Solr-tp3997369p3997464.html
>  To unsubscribe from Expression Sort in Solr, click 
> here
> .
> NAML
>



-- 

"Never explain yourself. Your friends don’t need it and
your enemies won’t believe it" .




--
View this message in context: 
http://lucene.472066.n3.nabble.com/Expression-Sort-in-Solr-tp3997369p3997475.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Expression Sort in Solr

2012-07-26 Thread Erik Hatcher
How dynamic are those numbers?   If this expression can be computed at index 
time into a "sort_order" field, that'd be best.  Otherwise, if these factors 
are truly dynamic at run-time, look at the function query sorting capability 
here:  and build up 
the expression from there.  I still encourage you to aim towards computing as 
much of this at index-time as possible to minimize the functions (and thus 
caches) you need at query time.

Erik

On Jul 26, 2012, at 03:47 , lavesh wrote:

> am working on solr for search. I required to perform a expression sort such
> that
> 
> ORDER BY (IF(COUNTRY=1,100,0) + IF(AVAILABLE=2,1000,IF(AVAILABLE=1,60,0)) +
> IF (DELIVERYIN IN (5,6,7),100,IF (DELIVERYIN IN (80,90),50,0))) DESC
> 
> can anyone tell me hows is this possible?
> 
> 
> 
> --
> View this message in context: 
> http://lucene.472066.n3.nabble.com/Expression-Sort-in-Solr-tp3997369.html
> Sent from the Solr - User mailing list archive at Nabble.com.