searchThings(query, lang = 'en') {
    let options = search.getSearchOptions('label', lang);
    let descriptionOptions = search.getSearchOptions('description', lang);
    options.fields = options.fields.concat(descriptionOptions.fields);
    Object.assign(options.highlight.fields, descriptionOptions.highlight.fields);

    return client.search({
      index: 'libreviews',
      body: {
        query: {
          bool: {
            must: [{
                match: {
                  type: 'thing'
                }
              },
              {
                simple_query_string: {
                  fields: options.fields,
                  query,
                  default_operator: 'and'
                }
              }
            ],
          },
        },
        highlight: options.highlight
      }
    });

  }
// Find things by their label or description; performs language fallback
Find things by their label or description; performs language fallback
Find things by their label or description ; performs language fallback
searchThings(query, lang = 'en') {
    let options = search.getSearchOptions('label', lang);
    let descriptionOptions = search.getSearchOptions('description', lang);
    options.fields = options.fields.concat(descriptionOptions.fields);
    Object.assign(options.highlight.fields, descriptionOptions.highlight.fields);
    return client.search({
      index: 'libreviews',
      body: {
        query: {
          bool: {
            must: [{
                match: {
                  type: 'thing'
                }
              },
              {
                simple_query_string: {
                  fields: options.fields,
                  query,
                  default_operator: 'and'
                }
              }
            ],
          },
        },
        highlight: options.highlight
      }
    });
  }
searchThings ( query , lang = 'en' ) { let options = search . getSearchOptions ( 'label' , lang ) ; let descriptionOptions = search . getSearchOptions ( 'description' , lang ) ; options . fields = options . fields . concat ( descriptionOptions . fields ) ; Object . assign ( options . highlight . fields , descriptionOptions . highlight . fields ) ; return client . search ( { index : 'libreviews' , body : { query : { bool : { must : [ { match : { type : 'thing' } } , { simple_query_string : { fields : options . fields , query , default_operator : 'and' } } ] , } , } , highlight : options . highlight } } ) ; }
Find things by their label or description; performs language fallback
Find things by their label or description ; performs language fallback