-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Search Solr (DS 7.X) with title containing colon doesn't return results except with quotes or escaping or having a stop word after the colon #9670
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
Search Solr (DS 7.X) with title containing colon doesn't return results except with quotes or escaping or having a stop word after the colon #9670
Comments
@fribeiro-fccn : The behavior you are seeing is because ":" (colon) is a special character in Solr, and it allows you to perform more advanced searches, like those described at https://wiki.lyrasis.org/display/DSDOC7x/Search+-+Advanced So, there are two main options here:
The only other option I can think of is to provide both options and let the user (or configuration) select which they want. This ticket is also related to / duplicate of DSpace/dspace-angular#1996 Needs discussion, as there are two approaches here and different sites seem to favor different approaches to this searchbox behavior. |
@tdonohue Thanks Tim. I opened this bug because in DSpace 5 when searching with : it automatically escapes the special characters as you can see in the example below. I agree that needs discussion. |
Personally I vote for adding a checkbox or button If the checkbox is not ticked, escape |
Following up on the issue DSpace/DSpace#9670 - here is a first proposal. Per default, this sets the 'advanced' flag to false and will escape ':' characters in the search string. Only with 'advanced = true' is the search string passed as-is. TODO: - add tests - make sure this looks good
Following up on the issue DSpace/DSpace#9670 - here is a first proposal. Per default, this sets the 'advanced' flag to false and will escape ':' characters in the search string. Only with 'advanced = true' is the search string passed as-is. TODO: - add tests - make sure this looks good
When searching for an item having ": "in the title doesn't return any values. The exceptions are:
1 - Quoting all the title "TITLE"
2 - Escaping the : with the backslash Example: FTG-Net-E: A hierarchical ensemble graph neural network for DDoS attack detection
3 - Having a stopword after the : lie on, or, at, in....
And it doesn't work either with a substring of the search expression.
To Reproduce
Using the demo.dspace.org with an actual title containing : FTG-Net-E: A hierarchical ensemble graph neural network for DDoS attack detection
To get reslts:
1 - Use quotes "FTG-Net-E: A hierarchical ensemble graph neural network for DDoS attack detection"
2 - Escape : : FTG-Net-E: A hierarchical ensemble graph neural network for DDoS attack detection
3 - Use a stopword: FTG-Net-E: An hierarchical ensemble graph neural network for DDoS attack detection
Note: I din't edit the title to add the the stop word, only inserted "an" instead of "a" and it works
Expected behavior
The title should be retrieved in search without the workaround
The text was updated successfully, but these errors were encountered: