Issue with DataVis and Data Cleaning advance query


I’m having an issue with the ‘count of property values’ section of the DataVis module. It seems like no matter how many times I set up an AND query, the saved instance (and results) is an OR (or something else, not the ones I’m looking for anyway). See a screen grab here.

Omeka S 4.1.0, DataVis 1.2.1.

Addendum: the same thing happens with other kinds of visualisation, not just the ‘count of property values’.

Addendum 2: I get the same behaviour when selecting the query for Data Cleaning, so I suspect this might not specifically module-related.

The ‘query preview’ already shows the results with the OR, not with AND. I am aware that the ‘advance edit’ text filed shows the query with the AND operator (property[0][joiner]=and etc.). The results are not compatible with that though.

After researching into it I found out that probably the ‘edit’ query generator is not outputting the correct query. Building my query manually and checking results via the API I manage to get the correct results.

Example below.

Query generated via the ‘edit’ button:

property[0][joiner]=and&property[0][property][]=2&property[0][type]=eq&property[0][text]=Scott, Walter, Sir, 1771-1832&property[0][joiner]=and&property[0][property][]=310&property[0][type]=eq&property[0][text]=German

Correct query:

property[0][joiner]=and&property[0][property][]=dcterms:creator&property[0][type]=eq&property[0][text]=Scott, Walter, Sir, 1771-1832&property[1][joiner]=and&property[1][property]=boslit:translationLanguage&property[1][type]=eq&property[1][text]=German

Note that 1. I don’t use indexes of the properties and 2. if I copy-paste the query I manually constructed into the ‘advance query’ field it get correctly interpreted.

Also note that simply changing all the indexes of the second property to 1 in the query generated via the interface fixes the query. So, I think the bottom-line issue is that property[0] is always declared also for subsequent appended queries, whereas it should be incremental (0,1,2, etc.).

The correct query generated via the interface as per my video screen grab should be:

property[0][joiner]=and&property[0][property][]=2&property[0][type]=eq&property[0][text]=Scott, Walter, Sir, 1771-1832&property[1][joiner]=and&property[1][property][]=310&property[1][type]=eq&property[1][text]=German

I cannot reproduce this. The query generator outputs incremental property indexes as it should. I’m not sure why

I notice that your property queries contain an extra [] that’s not expected. You have:


When it should be:


Do you have any modules that affect the search in any way? If you do, temporarily disable them and see if the query generator outputs the correct query.

Yes, the module Advance Search is the culprit. If disabled, the queries for DataVis and Data Cleaning get are generated correctly. Is this an incopatibility between those modules?

I would call it more an incompatibility between AdvancedSearch and Omeka S. You could post an issue on that repository, which is not maintained by the Omeka team.

1 Like

OK. Is it still an incompatibility with Omeka S if, with Advance Search on, the advanced search on admin/item gets generated correctly?

I can’t really comment on the extent of incompatibility, but it appears to modify the structure of queries. It’s possibly the reason why the generator outputs non-incremental property indexes. But that’s just a hunch.

Sure, thanks. I opened an issue on that repository.