04-08-2021 05:22 PM
We have a section in Nuxeo for employee photos. These files are their own doctype contained in a custom, folderish doctype called "Library." For this Library, I have created a custom page provider with predicates and aggregates of schema fields relevant to these types of documents. I am having an issue with the filters for some of the fields though.
For example, every employee has an employee ID, so I have a schema/field for it called employee:employee_id
(set as a string since IDs can contain letters or numbers). In the view of the parent container (Library) there is code to add a search filter in table view:
<nuxeo-data-table-column
name="Employee ID"
field="employee:employee_id"
sort-by="[[_displaySort(document, 'employee:employee_id')]]"
filter-by="employee_employee_id"
filter-expression="$term*"
flex="25">
<template>[[item.properties.employee:employee_id]]</template>
</nuxeo-data-table-column>
That field is a predicate in my custom page provider, with a full text operator. Here is the setup:
The issue I have is that for some IDs that all all numbers the filter works as expected and filters correctly as a user types in characters. However, for any of the IDs that start with letters the filter doesn't find anything at all. What could be causing this issue? I've tried different config settings, but I'm missing something (likely simple). Any guidance would be appreciated. Thanks.
I've attached a video demo of the search not working for an ID that starts with letters.
05-06-2021 04:48 PM
Here is the final config that we are running with that works (at least mostly).
04-09-2021 03:45 AM
Hello, have you observed the same behavior with the STARTSWITH
search operator?
04-09-2021 11:47 AM
If I use STARTSWITH
then filtering doesn't work at all—it doesn't even work for the numbers that were working before. Also, it seems STARTSWITH
should only be used for a path-type value?
04-09-2021 03:10 PM
The fulltext analyser behaviour can very between the backend database
04-09-2021 03:50 PM
We are on LTS 2019-HF42 (date 201901211253). Looks like Database is default of H2/Derby embedded databases, and I don't know much more since we are NCO—so whatever is the default for all of that.
04-21-2021 05:54 AM
Please do not open questions on answers.nuxeo.com if the question is related to a client
04-21-2021 11:47 AM
I thought that more general questions would be better served in this forum as others may have the same issues (I also didn't want to inundate support with tickets). However, I will do that from now on instead of using answers.nuxeo.com if that is the preferred option.
05-06-2021 04:25 PM
Phil Ludlow I know the thread stopped a while ago, has your issue been resolved? My 2 cents: you may need to update ES mappings, title "Making STARTSWITH work" sounds promising 😉 https://doc.nuxeo.com/nxdoc/configuring-the-elasticsearch-mapping/#making-startswith-work-with-a-cus...
05-06-2021 04:47 PM
I should have posted back with the solution we went with. Thanks for the reference, we didn't go with STARTSWITH since it seemed to be specifically for path-like data, but we probably could make a custom ES mapping based on what you linked.
05-06-2021 04:48 PM
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.