indexing - Tinkerpop API does not use mixed elasticsearch index while retrieving data from titan -


tinkerpop api not use mixed elasticsearch index while retrieving data titan. though if directly use titan api use mixed elasticsearch index.

e.g. have created mixed index on name.

when use tinkerpop api : graph.iterator().v().has("name", "apple"), not use mixed index on "name" , gives warning log 'query requires iterating on vertices'.

with titan api works fine , uses mixed index on "name" given below

titangraph.query().has("name", "apple").vertices() 

what can reason of this?

this cross-posted on tinkerpop mailing list

first off, if you're doing exact string matches, seems composite index fine.

you should review titan docs in chapter 20. index parameters , full-text search. when addkey(name) without mapping parameter, mixed index string key default full-text search -- addkey(name, mapping.text.asparameter()). there lot of gotchas listed in documentation consider full-text search:

  • the string tokenized bag of words allows user efficiently query matches contain 1 or multiple words.
  • titan’s default tokenization splits string on non-alphanumeric characters , removes tokens less 2 characters.
  • only full-text search predicates supported in graph queries indexing backend. [textcontains, textcontainsprefix, textcontainsregex]
  • full-text search case-insensitive.

your query trying equals comparison, perhaps mapping.string or mapping.textstring more appropriate.

i created couple gists compare different versions. can cut , paste these examples in gremlin console.

titan 0.5.4 https://gist.github.com/pluradj/ff1e1b1bcea0753adbb1

titan 1.0.0 https://gist.github.com/pluradj/9bf96f8eae9fa24f3d61

note behavior hasn't changed between titan 0.5.4 , 1.0.0, i'm not sure why example worked previously.


Comments

Popular posts from this blog

java - Run spring boot application error: Cannot instantiate interface org.springframework.context.ApplicationListener -

reactjs - React router and this.props.children - how to pass state to this.props.children -

Excel VBA "Microsoft Windows Common Controls 6.0 (SP6)" Location Changes -