Hi Mohammad,

Lucene indexes do not provide ordering (or better, they return results
based on their score, but it's not what you need).
What you can do here is define an additional NOTUNIQUE index on "name",
this will do the job

Thanks

Luigi

2018-03-31 23:45 GMT+02:00 Mohammad Hossein Ganjyar <
hossein.ganj...@gmail.com>:

> I have this problem with orientdb v2.2.31. I have vertex Users with
> properties id (no index), name (lucene index), family(lucene index).
> My quesry is :
> SELECT @rid, name , family FROM profiles
> order by name asc
> limit 10
> This query is very slow (exc in ~17 seconds).
> Do you best idea?
> thanks
>
> On Friday, September 26, 2014 at 1:20:12 PM UTC+3:30, Enrico Risa wrote:
>>
>> Hi Etienne
>>
>> can you try to remove the not unique index
>> and paste here the explain of
>>
>> *select from Tracks [Title, ArtistName, AlbumName] LUCENE 'daft+punk'
>> order by relevance desc*
>>
>>
>> Thanks
>>
>> Enrico
>>
>> 2014-09-26 11:30 GMT+02:00 Etienne Crinier <etienne...@gmail.com>:
>>
>>> Hi,
>>>
>>> I have a 'fulltext lucene' index to do a quick search on multiple
>>> fields. It is working properly.
>>> Now i would like to sort these results through a numeric field.
>>> Therefore, I created a 'notunique' index to this field.
>>> You can find below my request :
>>> *select from Tracks [Title, ArtistName, AlbumName] LUCENE 'daft+punk'
>>> order by relevance desc*
>>>
>>> Without the "order by" method performance is good:
>>> explainwithoutorderby.jpg
>>>
>>> Now with "order by": explainwithoutorderby.jpg
>>>
>>>
>>> You can see the order by index unused. Performance decreases
>>> dramatically.
>>>
>>> Do you have any idea on how to solve this issue?
>>>
>>> --
>>>
>>> ---
>>> You received this message because you are subscribed to the Google
>>> Groups "OrientDB" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to orient-databa...@googlegroups.com.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>> --
>
> ---
> You received this message because you are subscribed to the Google Groups
> "OrientDB" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to orient-database+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to orient-database+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to