Inconsistent Search Results with 2 Node Cluster
We are using elastic search. We have a 2 Node Cluster with 2 shards and 1 replica and are indexing around 4 million documents. We started noticing that the search results that we are getting back from the cluster are inconsistent in the total number of counts for the results, as well as the results that are being brought back. Here is an example: I search for a document with a very unique name using a DSF_QUERY_THEN_FETCH search. I know there is only one of this document on this server so when I search for the unique name, I should get only one document back but when I search it multiple times here is what happens (I excited the same search 5 times in a row) Search “uniqueTerm” Results - 1 Search “uniqueTerm” Results - 1 Search “uniqueTerm” Results - 0 Search “uniqueTerm” Results - 0 Search “uniqueTerm” Results - 0 And then it repeats the exact same pattern. It’s like it’s not finding the data part of the time. The weird thing is that it doesn’t matter have fast or how slow the I excite the searches, it finds it the first 2 times and for the next three it doesn’t. HOWEVER: If I modify the cluster to have 1 node, 1 shard, no replicas, and repeat the same test the results are such: Search “uniqueTerm” Results - 1 Search “uniqueTerm” Results - 1 Search “uniqueTerm” Results - 1 Search “uniqueTerm” Results - 1 Search “uniqueTerm” Results - 1 We are running elasticsearch 1.1.0 and using the Java API to excute our searches. Does anyone know if there is a setting or something that we are missing in our cluster? Thanks again -- View this message in context: http://elasticsearch-users.115913.n3.nabble.com/Inconsistent-Search-Results-with-2-Node-Cluster-tp4056008.html Sent from the ElasticSearch Users mailing list archive at Nabble.com. -- You received this message because you are subscribed to the Google Groups "elasticsearch" group. To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/1400256193906-4056008.post%40n3.nabble.com. For more options, visit https://groups.google.com/d/optout.
Mapping Arrays - Weird Question
So I'm working on the JSON mapping for several of our documents and one of the fields happens to be a string array. I looked at the documentation for how it's supposed to be done and it left me confused. Could someone clarify it for me? Here is essentially what I want to happen (part of my mapping): "properties" :{ ... "variableId" : {"type" : "string", "store" : true, "index" : "not_analyzed"}, "variableDisplayName" : {"type" : "string", "store" : true, "index" : "analyzed"}, "variablesUsed" : {"type" : "array", "store" : true, "index" : "analyzed"}, "encryptedStatus" : {"type" : "boolean", "store" : true, "index" : "not_analyzed"}, ... } The third line being the string array. I know the syntax is wrong but that is essentially what i want to accomplish. So with that being said would this be how I map it?: "properties" :{ ... "variableId" : {"type" : "string", "store" : true, "index" : "not_analyzed"}, "variableDisplayName" : {"type" : "string", "store" : true, "index" : "analyzed"}, "variablesUsed" : {"type" : "array", "store" : true, "index" : "analyzed"}, "lists" : { "properties" : { "variablesUsed" : {"type" : "string", "store" : true, "index" : "analyzed"}] } }, "encryptedStatus" : {"type" : "boolean", "store" : true, "index" : "not_analyzed"}, ... } -- View this message in context: http://elasticsearch-users.115913.n3.nabble.com/Mapping-Arrays-Weird-Question-tp4053902.html Sent from the ElasticSearch Users mailing list archive at Nabble.com. -- You received this message because you are subscribed to the Google Groups "elasticsearch" group. To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/1397134368768-4053902.post%40n3.nabble.com. For more options, visit https://groups.google.com/d/optout.
TransportClient timeout / webserver configuration - JAVA Api
Hello, I'm developing a tomcat webserver application that uses ElasticSearch 1.0 (Java API). There is a client facing desktop application that communicates with the server so all the code for ElasticSearch is on that one instance and it is used by all our clients. With that being said I am running into this issue: After initializing a new TransportClient object and performing some operation on it, there is a chance that i could sit idle for a very long time. When does sit idle for a long time it gets this error: Mar 08, 2014 1:15:37 AM org.elasticsearch.client.transport INFO: [Elven] failed to get node info for [#transport#-1][WIN7-113-00726][inet[/159.140.213.87:9300]], disconnecting... org.elasticsearch.transport.RemoteTransportException: [Server_Dev1][inet[/159.140.213.87:9300]][cluster/nodes/info] Caused by: java.lang.NullPointerException at org.elasticsearch.http.HttpInfo.writeTo(HttpInfo.java:82) at org.elasticsearch.action.admin.cluster.node.info.NodeInfo.writeTo(NodeInfo.java:301) at org.elasticsearch.action.admin.cluster.node.info.NodesInfoResponse.writeTo(NodesInfoResponse.java:63) at org.elasticsearch.transport.netty.NettyTransportChannel.sendResponse(NettyTransportChannel.java:83) at org.elasticsearch.action.support.nodes.TransportNodesOperationAction$TransportHandler$1.onResponse(TransportNodesOperationAction.java:244) at org.elasticsearch.action.support.nodes.TransportNodesOperationAction$TransportHandler$1.onResponse(TransportNodesOperationAction.java:239) at org.elasticsearch.action.support.nodes.TransportNodesOperationAction$AsyncAction.finishHim(TransportNodesOperationAction.java:225) at org.elasticsearch.action.support.nodes.TransportNodesOperationAction$AsyncAction.onOperation(TransportNodesOperationAction.java:200) at org.elasticsearch.action.support.nodes.TransportNodesOperationAction$AsyncAction.access$900(TransportNodesOperationAction.java:102) at org.elasticsearch.action.support.nodes.TransportNodesOperationAction$AsyncAction$2.run(TransportNodesOperationAction.java:146) 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 there any way to prevent this from happening? I know the ideal situation would be that after every request the transport client is closed. But since it lives on a webserver with lots of search requests coming in, we would ideally like it to stay open because it takes 3-4 seconds for a transport client to initialize and we are going for speed here. Also since we are having one central server to handle all search and index requests, can the TransportClient handle multiple simultaneous requests from different users at the same time? We just want to make sure that we are doing this correctly. -- View this message in context: http://elasticsearch-users.115913.n3.nabble.com/TransportClient-timeout-webserver-configuration-JAVA-Api-tp4051428.html Sent from the ElasticSearch Users mailing list archive at Nabble.com. -- You received this message because you are subscribed to the Google Groups "elasticsearch" group. To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/1394459022952-4051428.post%40n3.nabble.com. For more options, visit https://groups.google.com/d/optout.