All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.senseidb.search.client.req.query.MatchAllQuery Maven / Gradle / Ivy

The newest version!
package com.senseidb.search.client.req.query;

import com.senseidb.search.client.json.CustomJsonHandler;

/**
 *     

A query that matches all documents. Maps to Sensei MatchAllDocsQuery.

{
   
"match_all" : { }
}

Which can also have boost associated with it:

{
   
"match_all" : { "boost" : 1.2 }
}

Index Time Boost

When indexing, a boost value can either be associated on the document level, or per field. The match all query does not take boosting into account by default. In order to take boosting into account, the norms_field needs to be provided in order to explicitly specify which field the boosting will be done on (Note, this will result in slower execution time). For example:

{
   
"match_all" : { "norms_field" : "my_field" }
}
* */ @CustomJsonHandler(QueryJsonHandler.class) public class MatchAllQuery extends Query { double boost; public MatchAllQuery(double boost) { super(); this.boost = boost; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy