[Tiki-devel] elasticsearch "not empty" filter regression

Jonny Bradley via TikiWiki-devel <[email protected]>
Newsgroups gmane.comp.cms.tiki.devel
Message-ID <[email protected]>
Hi all, i suspect this might be A Victor Thing, but asking here just in case... :p

There seems to be a regression in list plugins between 18.x and now (since 21.x at least) and i can't work out what the difference is.

    https://dev.tiki.org/item7808-Empty-query-no-longer-works-in-elastic-search

I have this page in both trunk and 18.x, both of which are using the same elasticsearch 5.x locally:

{LIST(cache="y")}  {filter type="trackeritem"}
  {filter field="tracker_id" content="4"}
  {filter field="tracker_field_fileField" content="NOT "}
  {OUTPUT()}
  __{display name="title"}__ {display name="tracker_field_fileField" format="trackerrender"}{OUTPUT}
{LIST}

The "NOT " filter on 18.x works as expected and only returns items with a file, but on 21+ it returns all items.

I've stepped through \Search_Elastic_Connection::post, even into the $client->send() function as it has changed from Zend to Laminas now, but the body of the request is identical in both tikis, so it must be now tiki is setting up the index i think - does anyone have any ideas?

jonny

p.s. i tried replacing the `wildcard:field:*` with `exists:field` but it works/fails the same, as apparently elastic converts "Pure wildcards \* are rewritten to exists queries for efficiency", so could it be that empty fields are stored differently from 18.x?
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.