/** * Adds an individual query for a search field that SHOULD occur.<p> * * If this is used, any setting made with {@link #setQuery(String)} and {@link #setField(String[])} * will be ignored and only the individual field search settings will be used.<p> * * When combining occurrences of SHOULD, MUST and MUST_NOT, keep the following in mind: * All SHOULD clauses will be grouped and wrapped in one query, * all MUST and MUST_NOT clauses will be grouped in another query. * This means that at least one of the terms which are given as a SHOULD query must occur in the * search result.<p> * * @param fieldName the field name * @param searchQuery the search query * * @since 7.5.1 */ public void addFieldQueryShould(String fieldName, String searchQuery) { addFieldQuery(fieldName, searchQuery, BooleanClause.Occur.SHOULD); }
/** * Adds an individual query for a search field that MUST occur.<p> * * If this is used, any setting made with {@link #setQuery(String)} and {@link #setField(String[])} * will be ignored and only the individual field search settings will be used.<p> * * When combining occurrences of SHOULD, MUST and MUST_NOT, keep the following in mind: * All SHOULD clauses will be grouped and wrapped in one query, * all MUST and MUST_NOT clauses will be grouped in another query. * This means that at least one of the terms which are given as a SHOULD query must occur in the * search result.<p> * * @param fieldName the field name * @param searchQuery the search query * * @since 7.5.1 */ public void addFieldQueryMust(String fieldName, String searchQuery) { addFieldQuery(fieldName, searchQuery, BooleanClause.Occur.MUST); }
/** * Adds an individual query for a search field that MUST occur.<p> * * If this is used, any setting made with {@link #setQuery(String)} and {@link #setField(String[])} * will be ignored and only the individual field search settings will be used.<p> * * When combining occurrences of SHOULD, MUST and MUST_NOT, keep the following in mind: * All SHOULD clauses will be grouped and wrapped in one query, * all MUST and MUST_NOT clauses will be grouped in another query. * This means that at least one of the terms which are given as a SHOULD query must occur in the * search result.<p> * * @param fieldName the field name * @param searchQuery the search query * * @since 7.5.1 */ public void addFieldQueryMust(String fieldName, String searchQuery) { addFieldQuery(fieldName, searchQuery, BooleanClause.Occur.MUST); }
/** * Adds an individual query for a search field that MUST NOT occur.<p> * * If this is used, any setting made with {@link #setQuery(String)} and {@link #setField(String[])} * will be ignored and only the individual field search settings will be used.<p> * * When combining occurrences of SHOULD, MUST and MUST_NOT, keep the following in mind: * All SHOULD clauses will be grouped and wrapped in one query, * all MUST and MUST_NOT clauses will be grouped in another query. * This means that at least one of the terms which are given as a SHOULD query must occur in the * search result.<p> * * @param fieldName the field name * @param searchQuery the search query * * @since 7.5.1 */ public void addFieldQueryMustNot(String fieldName, String searchQuery) { addFieldQuery(fieldName, searchQuery, BooleanClause.Occur.MUST_NOT); }
/** * Adds an individual query for a search field that MUST NOT occur.<p> * * If this is used, any setting made with {@link #setQuery(String)} and {@link #setField(String[])} * will be ignored and only the individual field search settings will be used.<p> * * When combining occurrences of SHOULD, MUST and MUST_NOT, keep the following in mind: * All SHOULD clauses will be grouped and wrapped in one query, * all MUST and MUST_NOT clauses will be grouped in another query. * This means that at least one of the terms which are given as a SHOULD query must occur in the * search result.<p> * * @param fieldName the field name * @param searchQuery the search query * * @since 7.5.1 */ public void addFieldQueryMustNot(String fieldName, String searchQuery) { addFieldQuery(fieldName, searchQuery, BooleanClause.Occur.MUST_NOT); }
/** * Adds an individual query for a search field that SHOULD occur.<p> * * If this is used, any setting made with {@link #setQuery(String)} and {@link #setField(String[])} * will be ignored and only the individual field search settings will be used.<p> * * When combining occurrences of SHOULD, MUST and MUST_NOT, keep the following in mind: * All SHOULD clauses will be grouped and wrapped in one query, * all MUST and MUST_NOT clauses will be grouped in another query. * This means that at least one of the terms which are given as a SHOULD query must occur in the * search result.<p> * * @param fieldName the field name * @param searchQuery the search query * * @since 7.5.1 */ public void addFieldQueryShould(String fieldName, String searchQuery) { addFieldQuery(fieldName, searchQuery, BooleanClause.Occur.SHOULD); }
/** * Adds an individual query for a search field.<p> * * If this is used, any setting made with {@link #setQuery(String)} and {@link #setField(String[])} * will be ignored and only the individual field search settings will be used.<p> * * When combining occurrences of SHOULD, MUST and MUST_NOT, keep the following in mind: * All SHOULD clauses will be grouped and wrapped in one query, * all MUST and MUST_NOT clauses will be grouped in another query. * This means that at least one of the terms which are given as a SHOULD query must occur in the * search result.<p> * * @param fieldName the field name * @param searchQuery the search query * @param occur the occur parameter for the query in the field * * @since 7.5.1 */ public void addFieldQuery(String fieldName, String searchQuery, Occur occur) { addFieldQuery(new CmsSearchParameters.CmsSearchFieldQuery(fieldName, searchQuery, occur)); }