I have the next database schema:
vertex type Location(properties: id, name)
vertex type Alias(properties: name)
edge type Language(properties: name)
Each vertex of Location can have multiple edges with Aliases.
For example:
location(1,London) -> edge language(name='english') ->
alias(name='City of London')
-> edge
language(name='french') -> alias(name='Londres')
There are about 600 000 locations and more than 1 000 000 aliases. I need
to implement fast search of locations through the location names and
aliases for typeahead.
I've applied Lucene indices both to Location.name and Alias.name and
expected to get appropriate locations list running query like:
select from Location where name LUCENE 'Lon*' or out_language.in.name
LUCENE 'Lon*' limit=20
something like that.
But it does not work. This query returns all the locations from database.
I've found another one query that works correctly
select from
(traverse * from (select in_language from Alias where name LUCENE 'Lon*')
while $depth <=2)
where @class='Location'
but I'm worried about the performance.
Could someone offer me another variants? Or how to tune this one query.
Thanks in advance.
--
---
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 [email protected].
For more options, visit https://groups.google.com/d/optout.