-
Notifications
You must be signed in to change notification settings - Fork 470
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Spike] Compile examples of Lucene queries based on filtering params #30911
Comments
Basic Rules in the Search functionality
core/dotCMS/src/main/java/com/dotmarketing/portlets/contentlet/ajax/ContentletAjax.java Lines 614 to 618 in 1f2c750
String specialCharsToEscapeForMetaData = "([+\\-!\\(\\){}\\[\\]^\"~?:/\\\\]{2})"; But, for fields that are NOT of type text, system, date, language ID, or when the "catchall" term is used in the query, we escape their values with another set: String specialCharsToEscape = "([+\\-!\\(\\){}\\[\\]^\"~*?:\\\\]|[&\\|]{2})";
Always-Visible fields in the Relationships dynamic dialog
With multiple words, it'd be:
When looking in all Sites, the term is just not included in the query so that all contents can be retrieved.
When looking in all languages, just don't include the term in the query. User Searchable Fields that can be added to the dynamic dialog
However, the String of the file name right next to the extension is not being indexed correctly. You can match the file by typing SUGGESTION: The query should include a wildcard at the end, at least. For instance, when looking for a filename such as
This code change is NOT present yet. It'd need to be added.
When looking for more words, such as "Content 2", the query includes them as separate terms:
For more than one, it just adds it like this:
Notice the the way the checkbox term is added to the query, which is wrong. It must look like this:
It should be {contentTypevarName}.{fieldVarName} and it should include the _dotraw as well. For multiple values, the Lucene query just includes the same terms for each of them:
Out of the UI, you can pass down the time using, for instance, a 24-hour format. So, looking for a content with a value of "1:00PM", you can match it using a date and time range like this one:
You can use the following format for specifying both date and time:
But if you look for "Content 2", it looks like this:
Notice that the term
If you select more than one entry, The query looks like this:
IMPORTANT: The dropdown ONLY shows up in the The backend takes such an Identifier and retrieves the parents that include it. Let's consider the following example: You have a the following Identifiers:
In the Relationships dialog, you want to look for contents that are referencing the child content
If you have one more parent Contentlet, say
This is something that might not be doable from the Angular layer, so we might need to have a new REST Endpoint for it.
IMPORTANT: The UI is automatically adding a "None" option to the select. This is also happening in the Search portlet, but the "None" word is not showing up.
For more than one Tag, the term is repeated like this:
IMPORTANT: The Search portlet provides a Tag predictor after typing 3 characters. This is NOT happening in the Relationships search dialog.
When looking for "content 2", it just repeats the search terms:
->
It also takes time ranges. So, if you're looking for a content with "time" between 1:13PM and 1:16PM, the query will look like this:
Using square brackets and the word ->
|
Parent Issue
Task
After meeting with @oidacra and @nicobytes , we agreed on me providing a list of sample Lucene queries that must be sent to the back-end based on the different
User Searchable
fields that can be displayed when looking for related content in the Relationships Field.Proposed Objective
Core Features
Proposed Priority
Priority 2 - Important
Acceptance Criteria
The value of almost every type of
User Searchable
field must be carefully formatted in order to be passed down to a Lucene query. This must be taken into consideration for dotCMS to correctly return the expected data.External Links... Slack Conversations, Support Tickets, Figma Designs, etc.
No response
Assumptions & Initiation Needs
No response
Quality Assurance Notes & Workarounds
QA is NOT needed.
Sub-Tasks & Estimates
No response
The text was updated successfully, but these errors were encountered: