Query returns the same document 7 times

Have a look also at sense: GitHub - bleskes/sense: A JSON aware developer's interface to Elasticsearch. Comes with handy machinery such as syntax highlighting, autocomplete, formatting and code folding.

David Pilato | Technical Advocate | Elasticsearch.com
@dadoonet | @elasticsearchfr | @scrutmydocs

Le 4 juin 2013 à 09:07, eranid eranid@gmail.com a écrit :

I found that using the plugin elastisearch-head really helped me monitor my
indexes.
Especially at the testing phase where there is a rather small number of
documents.

It's a very handy debugging tool.
ElasticSearch Head
http://mobz.github.io/elasticsearch-head/

--
View this message in context: http://elasticsearch-users.115913.n3.nabble.com/Query-returns-the-same-document-7-times-tp4035888p4035970.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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Great! Thank you! This really helped me alot :slight_smile:

Den söndagen den 2:e juni 2013 kl. 21:45:22 UTC+2 skrev Kya W:

Hi there!
I'm currently trying to use Elasticsearch in my thesis work, but
encountered a problem. If I use a term, for example "Monkey", which has 1
hit in my index... It returns this document 7 times. I use Jest together
with Elasticsearch since it was a bit easier to understand. I want every
document in my index to be returned maximum 1 time per search... not 7. I
would be very grateful for your help. I provide the code I have i my
"QueryManager" so far:

public class QueryManager {

private SearchSourceBuilder searchBuilder;
private JestClient client;

public QueryManager(JestClient client){
    this.client = client;
    searchBuilder = new SearchSourceBuilder();
    
}

public List<Documents> matches(String search){
    Search search1 = new 

Search(searchBuilder.query(QueryBuilders.multiMatchQuery(
search, //our search-term
"title", "content", "url") //searching in the fields title,
content and url
).toString());
search1.addIndex("data");
search1.addType("apa");

    JestResult result;
    try {
        result = client.execute(search1);
        List<Documents> documents = 

result.getSourceAsObjectList(Documents.class);
//debug, return size of list
System.out.println(documents.size());
return documents;
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
System.out.println("Nooo \n");
return null;
}

}

}

--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.