Unable to render Jira issues macro, execution error.

Syntax Proposal

Simplest Interval Query

q={!interval}foo bar 
  1. This detects field via Solr df logic (check local param first, then query parameter).
  2. The given string is analyzed with query analyzer from the given field
  3. Produced token stream is turned into phrase.

The same is achieved via JSON request API via Query DSL.

{ "query":{"interval":"foo bar"}}

still the same functionality in a little bit complicated form

{ "query":{"interval":{"json_param":"int_q"}},
"params":{"int_q":"foo bar"}
}

IntervalSource Object

parsing JSON query. Notice abbreviations used below: IS, I.x

{ "query":{"interval":{"json_param":"int_q"}},
"params":{"int_q":{ // this is IntervalSource object, referred as IS object below

// these props are exclusive, only one of them is allowed
"phrase": "token stream goes to I.phrase()", // or ["any other", "string. token streams are concatenated (flattern) and go to I.phrase()", {/* or separate IS objs as elems*/}]
"prefix": "passes *multiterm* field analysis, strictly expecting single token stream, turns to I.prefix()"
"term": "passes field analysis, strictly expecting single token stream, turns to I.term()", // should it support single elem array? ["foo"]
"raw": "bypass analysis, turns to I.term()",
"or":[ "token stream handled as one phrase, single token as {term}" , { /* IS object goes here*/ } ],
"ordered": "like _phrase_, but turns to I.ordered() ", // or list ["but, no phrase flatterning happens "]
"unordered": "like _phrase_, but turns to I.unordered() ", // or list ["but, no phrase flatterning happens "]

// these might attribute others, but not all of them
"gaps":2, // Optional. wraps underneath IS with I.maxgaps(), presumably, shouldn't be combined with _phrase_
"width":2, // Optional. wraps underneath IS with I.maxwidth(), I'm not sure how it's combined with gaps above
"field":"title",// Optional. wraps underneath IS with I.fixField(),
"max_expansions":123 // "only for _prefix_"
}
}
}

Limitations

  • ignores PositionIncrement Attribute so far. 
  • limited set of methods is supported

Sample 

{   "query":{"interval":{"json_param":"int_q"}},
"params":{"int_q": {
"ordered": ["Apache", "Software", {"prefix":"Found"}],
"gaps":5
}
}
}

something different 

{ 
"int_q": {
"ordered": ["Apache", {"phrase": ["Software", {"prefix":"Found"}]}],
"gaps":5
}
}

.

  • No labels