I have indexing
PropertyKey pkuserFullName = mgmt.makePropertyKey("userFullName").dataType(String.class).make();
mgmt.buildIndex("indexuserFullName",Vertex.class).addKey(pkuserFullName).buildMixedIndex("search");
PropertyKey pkgender = mgmt.makePropertyKey("gender").dataType(String.class).make();
mgmt.buildIndex("indexgender",Vertex.class).addKey(pkgender).buildMixedIndex("search");
Here is index query:
Iterable<Result<Vertex>> vertices = g.indexQuery("indexuserFullName","v.userFullName:Rohit~1 and v.gender:Male").vertices();
Exception in thread "main" java.lang.IllegalArgumentException: The used key [gender] is not indexed in the targeted index [indexuserFullName]
at com.google.common.base.Preconditions.checkArgument(Preconditions.java:120)
at com.thinkaurelius.titan.graphdb.database.IndexSerializer.executeQuery(IndexSerializer.java:612)
at com.thinkaurelius.titan.graphdb.query.graph.IndexQueryBuilder.execute(IndexQueryBuilder.java:176)
at com.thinkaurelius.titan.graphdb.query.graph.IndexQueryBuilder.vertices(IndexQueryBuilder.java:195)
at newpackage.ElasticSearch.show(ElasticSearch.java:105)
at newpackage.ElasticSearch.main(ElasticSearch.java:157)
How should I make this kind multifield query in 0.5.0.
Again the below indexQuery work fine:
Iterable<Result<Vertex>> vertices = g.indexQuery("indexuserFullName","v.userFullName:Rohit~1").vertices();
in the log it shows:
Converted query string with 1 replacements: [v.userFullName:manish~1] => [cwlh:Rohit~1]
When i execute below query directly using ES client:
SearchResponse response = client.prepareSearch("titan")
.setTypes("vertex")
.setQuery(QueryBuilders.queryString("cwlh:Rohit~1"))
.execute()
.actionGet();
it return 0 result why ? it is the same version of index query.
and at the end it show
93651 [elasticsearch[Merlin][generic][T#3]] INFO org.elasticsearch.client.transport - [Merlin] failed to get local cluster state for [Blazing Skull][TF1gTpQ9QZmqn2fHTWYagw][manish-Vostro-2520][inet[/10.253.39.25:9300]], disconnecting...
org.elasticsearch.transport.ReceiveTimeoutTransportException: [Blazing Skull][inet[/10.253.39.25:9300]][cluster/state] request_id [31] timed out after [5001ms]
at org.elasticsearch.transport.TransportService$TimeoutHandler.run(TransportService.java:369)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)
93651 [elasticsearch[Merlin][generic][T#2]] INFO org.elasticsearch.client.transport - [Merlin] failed to get local cluster state for [#transport#-1][manish-Vostro-2520][inet[/127.0.0.1:9300]], disconnecting...
org.elasticsearch.transport.ReceiveTimeoutTransportException: [][inet[/127.0.0.1:9300]][cluster/state] request_id [30] timed out after [5001ms]
at org.elasticsearch.transport.TransportService$TimeoutHandler.run(TransportService.java:369)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)
is this exception something to worry about as it show timeOutException?