project-lux / lux-marklogic

Code, issues, and resources related to LUX MarkLogic
Other
3 stars 2 forks source link

Wildcards '?' are not being accounted for estimates (from 1132) #48

Open gigamorph opened 4 months ago

gigamorph commented 4 months ago

Problem Description: When using the wildcard '?', the estimates and search results do not match. For example search result "mezzotint? AND technique" indicates 23 objects, but it shows 0 objects results.

Expected Behavior/Solution: The object tab and the object results should match and show valid results when using wildcards.

Requirements:

Needed for promotion: If an item on the list is not needed, it should be crossed off but not removed.

UAT/LUX Examples: What it looks like now: "mezzotint? AND technique" https://bugherd-attachments.s3.amazonaws.com/ljxvrubjrmldj8nm2omeka/screenshot.jpg

What it should look like: Object tabs and object results have the same number of results. Under the object results there should be valid results.

Dependencies/Blocks:

Related Github Issues:

Related links:

source: https://yale-yuci.my.salesforce.com/?ec=302&startURL=%2Fvisualforce%2Fsession%3Furl%3Dhttps%253A%252F%252Fyale-yuci.lightning.force.com%252Flightning%252Fr%252FCase%252F500TV000002QPrFYAW%252Fview

bugherd: https://www.bugherd.com/projects/284041/tasks/1919

search estimate end point returns estimates whereas the search endpoint does not return results

Wireframe/Mockup:

ar2674 commented 4 months ago

From old ticket:

From @pc754 in bugherd: "Estimates do not account for wildcards in Marklogic. I can put some more thought into this, but I can't think of a good way at the moment to make sure those estimates account for wildcards. If we account for wildcards it would be a workaround to Marklogic's behavior.

As for wildcard characters, I can explain why this happens:

? replaces a single word character, but in the documents, mezzotint is followed by a space, which is not a word character.

can match 0 or more characters, so in this case it works because it matches 0 characters"

@pc754 please let me know when you are done investigating/found a way to make sure the estimates account for wildcards. Afterwards, I will update what the solution should look like/requirements should be.

roamye commented 3 months ago

@prowns @clarkepeterf Added a question within the issue as I went to use facets on the ? example and saw the estimates were also off:
"Is making sure the facets account for ? estimates also a part of this ticket or would we need a new ticket for that?"

prowns commented 3 months ago

From the original GH/Bugherd (PC): "Estimates do not account for wildcards in Marklogic. I can put some more thought into this, but I can't think of a good way at the moment to make sure those estimates account for wildcards. If we account for wildcards it would be a workaround to Marklogic's behavior.

As for wildcard characters, I can explain why this happens:

? replaces a single word character, but in the documents, mezzotint is followed by a space, which is not a word character.

can match 0 or more characters, so in this case it works because it matches 0 characters"