complex_query using and_parameters does not return expected result
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 491
- Forks
- 290
- Avg merge
- 2d 8h
- Merged PRs (30d)
- 3
Description
Hi,
I have tried several queries with two tags.
In separate queries (search_index with one tag) the search with the first tag returns 321 events and with the second tag 27 events.
I would assume AND-ing these together into one complex_query as below returns at most 27 events, but it returns 321 events:
tags = ['iss-compliance:true', 'source:tls_stats']
complex_query = misp.build_complex_query(
and_parameters=tags
)
search_params = {
'tags': complex_query,
}
filtered_events = misp.search_index(**search_params)
What am I missing?
Thanks!
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading PyMISP's build_complex_query and search_index entry points, then compare the generated tags query with the MISP REST API's expected filtering semantics. Reproduce the two individual searches and the combined query using the issue's tag values; done means the combined search returns results consistent with AND semantics or the behavior is clearly documented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100