Difference between BooleanClause.Occur.Must and BooleanClause.Occur.SHOULD in lucene

BooleanClause.Occur.SHOULD means that the clause is optional, whereas BooleanClause.Occur.Must means that the clause is compulsory. However, if a boolean query only has optional clauses, at least one clause must match for a document to appear in the results. For better control over what documents match a BooleanQuery, there is also a minimumShouldMatch parameter which lets …

Read more

Search and delete multiple lines

The :global command is your friend – learn it well. It lets you run arbitrary :ex commands on every line that matches a regex. It abbreviates to :g. To delete all lines that match “George Bush”: :g/George Bush/ d The command that follows can have its own address/range prefix, which will be relative to the …

Read more

ElasticSearch – Searching For Human Names

First, I recreated your current configuration in Play: https://www.found.no/play/gist/867785a709b4869c5543 If you go there, switch to the “Analysis”-tab to see how the text is transformed: Note, for example that Heaney ends up tokenized as [hn, heanei] with the search_analyzer and as [HN, heanei] with the index_analyzer. Note the case-difference for the metaphone-term. Thus, that one is …

Read more

Lucene Score results

The scoring contains the Inverse Document Frequency(IDF). If the term “John Smith” is in one partition, 0, 100 times and in partition 1, once. The score for searching for John Smith would be higher search in partition 1 as the term is more scarce. To get round this you would wither have to have your …

Read more

JIRA: Searching for all issues with a given link type

You can use Script Runner plugin – Edit: It unfortunately is no longer free. The last version before 4.0 still is, though. Details here https://www.adaptavist.com/doco/display/SFJ/Downgrade+ScriptRunner It sports a ton of incredibly useful functions, one of these is hasLinks() Usage example: issueFunction in hasLinks(“blocks”) OR issueFunction in hasLinks(“is blocked by”)