Hello, i want the data witch : field "transacao" = " QuarantineTransac" and the field
"assunto" = "qualquerassunto", but is retrieving data witch one OR another no the 2 at the same time
@schneider
Your two queries are completely different. The original non-working query will return documents matching 3 criteria and second matches 2 criteria and get top transacao. Rough equivalent SQLs are
SELECT *
FROM <INDEX>
WHERE transacao = " QuarantineTransac" and assunto = "qualquerassunto" and data1 between (now-1h, now)
SELECT transacao, count as cnt
FROM <INDEX>
WHERE assunto = "qualquerassunto" and data1 BETWEEN (now-1h, now)
GROUP BY transacao
ORDER BY cnt DESC
Can you post example documents that match but not expected to match and documents that do not match but expected to match?
Only transacao, assunto and data1 values are important. You can omit other attributes if you prefer.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.