Help on putting together a java search

(dgh1) #1


Using the elasticserach web I can do structured search and it generate the json as shown below. Also I can curl using below and get results. However, what I can not figure out is how to do the below using the java API.

I have tried the QueryBuilder but can not figure out how to string together the correct Java sequence of calls to do the same as the below.

If anybody could show me how to do this or point to "detailed" documentation other than the Javadocs and the java examples, which are to vague, it would be greatly appreciated.

Thanks in advance for any help.



query: {
    bool: {
        must: [
                fuzzy: {
                    product: {
                        value: armchair
                        max_expansions: 5
        must_not: [ ]
        should: [ ]
from: 0
size: 50
sort: [ ]
facets: { }


(system) #2