Can someone let me know the output of this below code

(Vani Aravinda) #1

Can someone let me know the output of this below query which is used Java API. I'm not a Java developer. I want the output so that I can code in .NET as per the output.
QueryBuilder query = "(
TITLE:"same old song and \(dance)"^100
OR (
TITLE:same~0.8 AND TITLE:old~0.8 AND TITLE:song~0.8 AND TITLE:and~0.8 AND TITLE:??dance?~0.8
OR (
TITLE:same~0.5 AND TITLE:old~0.5 AND TITLE:song~0.5 AND TITLE:and~0.5 AND TITLE:??dance?~0.5
OR TITLE:"same old song and "~3^7
COMPOSERS:perry ~2^2 OR COMPOSERS:tallarico ~2^2 OR COMPOSERS:perry, tallarico~2^2
int page = 1
int pageSize = 10
SearchRequestBuilder builder = client.prepareSearch(index).setTypes(type);
builder.setFrom((page - 1) * pageSize).setSize(pageSize);
builder.setQuery(QueryBuilders.filteredQuery(query, FilterBuilders.notFilter(FilterBuilders.queryFilter(QueryBuilders.matchQuery("DELETED", "D")))));

SearchResponse searchResult = builder.get();

Vani Aravinda

(Adrien Grand) #2

Duplicate of Can some let know how to write below query in elasticsearch

(Adrien Grand) #3