Titan : Elastic Search Ignore stop word
-
21-12-2019 - |
Question
I am indexing country code as vertex property
v.setProperty("country","IN");
but when I do search like
g.indexQuery("search","v.country:IN").vertices();
It return zero result. I think its because of it hadling IN
as stop word. How can I avoid this ?
Solution
You can get around this by indexing country as a String:
import com.thinkaurelius.titan.core.Parameter
g.makeKey("country").dataType(String.class).indexed("search", Vertex.class,
Parameter.of(Mapping.MAPPING_PREFIX, Mapping.STRING)).make()
g.commit()
See Full Text and String Search for further details.
Cheers, Daniel
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow