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
4
votes
1 answer

Nested documents and boolean query with Elasticsearch

I'm trying to use a must_not boolean query on nested documents but I keep getting weird results. Here is an example to illustrate my issue. curl -X DELETE "http://localhost:9200/must_again/" curl -X POST "http://localhost:9200/must_again/" -d '{ …
Paté
  • 1,914
  • 2
  • 22
  • 33
3
votes
1 answer

Elastic search nest dynamic query with object initializer NEST 5.x

Hi I'm a new to elastic nest API and I'm using nest 5.x. I'm currently developing some kind of advanced search page so when user doesn't check a criteria i don't have to include that filter on my query. I'm trying to combine 2 queries under must…
si_yudist
  • 31
  • 1
  • 3
3
votes
1 answer

Filter on boolean field increases latency and CPU

I'm using the AWS ElasticSearch service (1.5.2) and is receiving more than 100 requests/sec without problems. Almost every query have geo filters, full text filters, integer filters... But I have a problem, adding one simple filter more; a boolean…
3
votes
1 answer

How to properly write boolean or logic in elasticsearch?

I want to grab all documents with loId=6 AND (actionType = "SAVE_DATA" OR actionType = "OPEN_SCREEN"). Am I writing this logic incorrectly? Why does my query return 0 results? Note: I'd accept a query or a filter to resolve this issue. These are…
Churro
  • 4,166
  • 3
  • 25
  • 26
2
votes
1 answer

how to combine results of query of multiple rows into one row

I have this results from this query. select distinct "CVE_ID","V19_200","V20","V20_100","V21","V21_100","V21_200" from cve_table where…
SamiEnazi
  • 43
  • 5
2
votes
1 answer

pandas - index data that comes after conditional

i have the following time series [0,1,2,3,2,1,0,1,2,3,2,1,0] i would like to boolean index all values that: include & come after 2 are greater than 0 terminates on 0 if the conditions are met, the following vector should be…
thenatlog
  • 81
  • 1
  • 7
2
votes
1 answer

need to upgrade from AND, OR filters on elasticsearch to boolean queries for ES7

i'm trying to update a query that was possible on ElasticSearch 2 and does not exist in ES7. it's this query below: { "filter": { "and":[ { "or":[ { "range": { "date_of_birth": { …
EdZ
  • 23
  • 4
2
votes
0 answers

Boolean query with multiple OR:s in a proximity search using Lucene syntax

I'm trying to create a search engine that uses Lucene syntax boolean queries to do searches against different thirdparties api. It all seems to work fine, the user enters the query in a textfield and I parse it using…
Daniel Gustafsson
  • 1,725
  • 7
  • 37
  • 78
2
votes
1 answer

How can I generate Query in elastic search for multiple boolean queries

I want to generate query for multiple boolean operation dynamically in elasticsearch with spring framework. my data in elasticsearch is like { "masterID" : "" "processedData": [ { "string_value": "22", …
2
votes
1 answer

ElasticSearch - all words must match in a query

I am using elastic search to find people in cities. So I have the properties firstname, lastname and city. A possible search term is for example "Charlotte Renee Tucker" which should return the following people: {firstname: "Charlotte Renee",…
Matthew Darton
  • 551
  • 1
  • 7
  • 27
2
votes
1 answer

In R programming, what's the difference between & vs &&, and | vs ||

I know the part that && and || make for more efficient code because they do the least number of tests in a chain and break out as soon as we have enough information to know what the result of the chain is going to be. As soon as && hits a FALSE in…
computronium
  • 445
  • 2
  • 11
2
votes
1 answer

How to modulo query on pandas

I need modulo query because the data is to long and need to show in one screen only. Here's my dataset Name 1 they 2 ulti 3 they 4 set 5 djhd 6 tdh 7 t473 What I need is, 1 modulo 3 in this case Name 1 they 4 …
Nabih Bawazir
  • 6,381
  • 7
  • 37
  • 70
2
votes
0 answers

Elasticsearch - interaction of filter/query context on bool and fuzzy queries

I'm seeing some curious effects when running fuzzy queries inside bool queries in filter vs. query context. I'm on Elasticsearch 6.0.0. I have an index whose documents have a field firstName. If I run the following, for example: { "query": { …
web
  • 192
  • 2
  • 12
2
votes
2 answers

Min_score for a "must" in a bool query in Elasticsearch

Is there a way to apply a minimum score to a must clause in a bool query in elasticsearch. I want to be able to do something like this: { "query": { "bool": { "must": [ { "match": { "name":…
kiml42
  • 638
  • 2
  • 11
  • 26
2
votes
1 answer

lucene BooleanQuery.Builder Build doesn't Work

Hello Guys i have a Question :) I create a BooleanQuery Like this : BooleanQuery.Builder qry = new BooleanQuery.Builder(); qry.add(new TermQuery(new Term("Name", "Anna")), BooleanClause.Occur.SHOULD); And if i do a search like this now : TopDocs…
Montezuma
  • 797
  • 6
  • 9
1
2
3
8 9