Questions tagged [booleanquery]

This tag is used in information retrieval scenario when you write a query with multiple rules combined with bolean conjunctive predicates.

This tag is used in information retrieval scenario when you write a query with multiple logical rules combined with bolean conjunctive predicates, e.g., AND, OR, NOT.

131 questions
0
votes
1 answer

Elasticsearch Bool query with minimum_should_match set to zero not honored

I add 3 documents POST test/_doc {"value": 1} POST test/_doc {"value": 2} POST test/_doc {"value": 3} then do the following query I expect to return all the 3 docs with documents matching should clause being ranked higher GET /test/_search { …
Kamboh
  • 155
  • 1
  • 12
0
votes
1 answer

Diffrence between output of elastic nested boolean queries

I would like to know if the following two elastic queries would lead to difrent outcomes or same? {"bool":{"should":[{"bool":{"must":[{"terms":{"assignee.raw":["AHMEDABAD TEXTILE INDUSTRY'S RESEARCH ASSOCIATION","AHMEDABAD TEXTILE INDUSTRY'S…
0
votes
1 answer

Single bool must queries in Elasticsearch

Does wrapping single Elasticsearch queries in bool must queries change search results, or are the following two queries identical (both in terms of how elasticsearch processes them and what the outcome is)? single query_string query (no bool query…
gustavz
  • 2,964
  • 3
  • 25
  • 47
0
votes
1 answer

Boolean Logic Question - Two different methods

I figured out two different ways of solving a question, and while both seem logical, only one of them works. Basically, the function will return true if all remaining candidates who have not been eliminated have the same minimum number of votes and…
0
votes
0 answers

how to make my search system answer the query with boolean operation (+ - or)?

I'm using Lucene for the first time I'm trying to make a search system with the following query... QueryParser qp1 = new QueryParser("title", new StandardAnalyzer()); Q1 = qp1.parse(tr.toString()); // The same think for Q,Q2,Q3 …
asma bzd
  • 11
  • 3
0
votes
1 answer

How to highlight Boolean FuzzyQueries in Lucene - boost must be a positive float?

I'm trying to be nice for users that make a lot of typos (like myself). I try to create a simple search page for some data. I build FuzzyQuerys in a BooleanQuery because I would like the user to make typos, for example this: BooleanQuery.Builder…
Rob Audenaerde
  • 19,195
  • 10
  • 76
  • 121
0
votes
1 answer

ElasticSearch: Create should queries from a dynamic list of criterias with NEST

Using ElasticSearch 7.6 I want to find all points which are inside a list of areas. There are several other filter criterias that are added to a list of QueryContainerDescriptors and applied on the final search. var queries = new…
lewi
  • 477
  • 1
  • 5
  • 18
0
votes
1 answer

Assign a higher score to matches containing the search query at an earlier position in elasticsearch

This question is similar to my other question enter link description here which Val answered. I have an index containing 3 documents. { "firstname": "Anne", "lastname": "Borg", } { "firstname":…
GNG
  • 1,341
  • 2
  • 23
  • 50
0
votes
1 answer

ElasticSearch filter by nested boolean type fields

I need to query on multiple nested fields on boolean types. Structure of mapping: "mappings" : { "properties" : { "leaders" : { "type" : "nested", "properties" : { "except_1" : { "type"…
Konrad Marzec
  • 109
  • 1
  • 10
0
votes
1 answer

SuggestionBuilder with BoolQueryBuilder in Elasticsearch

I am currently using BoolQueryBuilder to build a text search. I am having an issue with wrong spellings. When someone searches for a "chiar" instead of "chair" I have to show them some suggestions. I have gone through the documentation and observed…
sree
  • 868
  • 2
  • 12
  • 35
0
votes
0 answers

I am using elasticsearch in java and want to convert below to java code. I am having difficulty with aggregation and terms syntax

My Query is as follows POST user-info/_search { "size": 0, "query": { "bool": { "must": [ { "match_all": {} } ], "filter": { "range": { …
0
votes
1 answer

Is there performance difference between constant_score and bool query using filter?

When it comes to the "performance difference", I read nothing reliable till now. Based on its official docs, as to filter used in the bool query The clause (query) must appear in matching documents. However unlike must the score of the query will…
Hearen
  • 7,420
  • 4
  • 53
  • 63
0
votes
3 answers

Selecting data in the table with KeyValuePair - SQL

I'm trying to select the data from key value pair the problem is every time I'm using AND it only displaying a one record which is equal to Value column but if I tried to use OR it giving me wrong return of record. I already did some research…
0
votes
1 answer

Lucene search ton of names

I was trying to Search ton of names(10000+) against lucene index, the names were loaded from a text file. This is snippet of my code: Analyzer analyzer = new StandardAnalyzer(); MultiFieldQueryParser mParser = new…
James Zou
  • 13
  • 1
  • 5
0
votes
1 answer

Classifying Yes or No opinions using multiple Boolean Query

I have a collection of tweets that express Yes or No opinion about a referendum. I also have two groups of Politicians who support Yes and No. Similarly I have two sets of words which express Yes and No opinions. These words were extracted using…
Siddhant Tandon
  • 651
  • 4
  • 15
1 2 3
8 9