Quantcast

Question marks in advanced search

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Question marks in advanced search

Ursula Kampling
Hello!

When using the basic search in VuFind 3.1.1 for a search query which ends in a non-escaped question mark, the function fixTrailingQuestionMarks (https://github.com/vufind-org/vufind/pull/796; VuFindSearch/Backend/Solr/QueryBuilder.php) lets VuFind search for two variations of the search query: with escaped question mark OR with non-escaped question mark.
Using the same query in the advanced search, VuFind only searches for the given non-escaped query string.

On the one hand it's maybe unlikely that users add a question mark in the advanced search by mistake, so using the fixTrailingQuestionMarks function within the advanced search may seem to be unnecessary. But on the other hand it's really hard to explain to users that the same search query produces extremely different results depending on which search form you use. Would it be possible to integrate this function also into the advanced search?

Best regards,

Ursula
Ursula Kampling
Universitätsbibliothek Ilmenau
Langewiesener Str. 37
D-98693 Ilmenau
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Question marks in advanced search

Demian Katz
Ursula,

I don't think there was a conscious choice to exclude this functionality from advanced search; however, it was added as a quick fix for a common edge case, so we didn't take the time to implement it as comprehensively as possible. If you can find a clean way to implement it that accounts for the fact that we want to apply the fix to Lucene and Extended Dismax queries, but must not apply the fix to regular Dismax queries, I think that would be a helpful improvement. I haven't dug into this code in a while, though I know it's a bit convoluted. Is this something you'd be interested in trying to implement? If so, I'd encourage you to open a pull request and I can help test edge cases, etc. If this is more of a feature request, please feel free to open a JIRA ticket, though I can't guarantee I'll have time to tackle it right away.

- Demian

-----Original Message-----
From: Ursula Kampling [mailto:[hidden email]]
Sent: Thursday, December 08, 2016 8:16 AM
To: [hidden email]
Subject: [VuFind-General] Question marks in advanced search

Hello!

When using the basic search in VuFind 3.1.1 for a search query which ends in a non-escaped question mark, the function fixTrailingQuestionMarks (https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fvufind-org%2Fvufind%2Fpull%2F796&data=01%7C01%7Cdemian.katz%40villanova.edu%7Ceec6407236064e68927f08d41f77d82b%7C765a8de5cf9444f09cafae5bf8cfa366%7C1&sdata=zxPoqIbSwi7MarzZnH5FlUMqIWQemn5jOyTVWHUmXnE%3D&reserved=0;
VuFindSearch/Backend/Solr/QueryBuilder.php) lets VuFind search for two variations of the search query: with escaped question mark OR with non-escaped question mark.
Using the same query in the advanced search, VuFind only searches for the given non-escaped query string.

On the one hand it's maybe unlikely that users add a question mark in the advanced search by mistake, so using the fixTrailingQuestionMarks function within the advanced search may seem to be unnecessary. But on the other hand it's really hard to explain to users that the same search query produces extremely different results depending on which search form you use. Would it be possible to integrate this function also into the advanced search?

Best regards,

Ursula




-----
Ursula Kampling
Universitätsbibliothek Ilmenau
Langewiesener Str. 37
D-98693 Ilmenau
--
View this message in context: https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fvufind.2307425.n4.nabble.com%2FQuestion-marks-in-advanced-search-tp4670876.html&data=01%7C01%7Cdemian.katz%40villanova.edu%7Ceec6407236064e68927f08d41f77d82b%7C765a8de5cf9444f09cafae5bf8cfa366%7C1&sdata=mInwP0Z0pcCvFajbg6FzrCXNEMMErQ1JqxUuUw8DYPM%3D&reserved=0
Sent from the vufind-general mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/xeonphi _______________________________________________
VuFind-General mailing list
[hidden email]
https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.sourceforge.net%2Flists%2Flistinfo%2Fvufind-general&data=01%7C01%7Cdemian.katz%40villanova.edu%7Ceec6407236064e68927f08d41f77d82b%7C765a8de5cf9444f09cafae5bf8cfa366%7C1&sdata=5u2O8uvxP%2F7p3nDixrJmLEWVaWFtWRPArUNLaSj6jyk%3D&reserved=0
------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/xeonphi
_______________________________________________
VuFind-General mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/vufind-general
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Question marks in advanced search

Ursula Kampling
Hello Demian,

many thanks for your answer.

>> If you can find a clean way to implement it that accounts for the fact that we want to apply the fix to Lucene and Extended Dismax queries, but must not apply the fix to regular Dismax queries, I think that would be a helpful improvement. <<

Sounds complicated and I'm afraid it's far more complicated than I thought first. Nevertheless I fixed the problem for our extended dismax searches editing the VuFindSearch/Backend/Solr/SearchHandler.php function "createQueryString". But that's an ugly solution that furthermore doesn't solve the problem for searches not using extended dismax. So I didn't dare to post this as a pull request but opened a new jira ticket and attached my diff(s). (https://vufind.org/jira/browse/VUFIND-1217)

Best regards,

Ursula
Ursula Kampling
Universitätsbibliothek Ilmenau
Langewiesener Str. 37
D-98693 Ilmenau
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Question marks in advanced search

Demian Katz
Ursula,

Thanks for sharing this. Since eDismax is going to be the most common search solution going forward, I'm sure this could be useful to others. When time permits, I'll take a closer look at your patch and give some thought as to how it could best be integrated into the logic.

- Demian

-----Original Message-----
From: Ursula Kampling [mailto:[hidden email]]
Sent: Monday, December 12, 2016 6:00 AM
To: [hidden email]
Subject: Re: [VuFind-General] Question marks in advanced search

Hello Demian,

many thanks for your answer.

>> If you can find a clean way to implement it that accounts for the
>> fact that we want to apply the fix to Lucene and Extended Dismax
>> queries, but must not apply the fix to regular Dismax queries, I
>> think that would be a helpful improvement. <<

Sounds complicated and I'm afraid it's far more complicated than I thought first. Nevertheless I fixed the problem for our extended dismax searches editing the VuFindSearch/Backend/Solr/SearchHandler.php function "createQueryString". But that's an ugly solution that furthermore doesn't solve the problem for searches not using extended dismax. So I didn't dare to post this as a pull request but opened a new jira ticket and attached my diff(s). (https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fvufind.org%2Fjira%2Fbrowse%2FVUFIND-1217&data=01%7C01%7Cdemian.katz%40villanova.edu%7Cc48fb440e0ff44640e9608d42280366e%7C765a8de5cf9444f09cafae5bf8cfa366%7C1&sdata=0a8UkDklztCJcL3C4XnSFEknsER7VkwnaT7kpuc5R8g%3D&reserved=0)

Best regards,

Ursula




-----
Ursula Kampling
Universitätsbibliothek Ilmenau
Langewiesener Str. 37
D-98693 Ilmenau
--
View this message in context: https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fvufind.2307425.n4.nabble.com%2FQuestion-marks-in-advanced-search-tp4670876p4670878.html&data=01%7C01%7Cdemian.katz%40villanova.edu%7Cc48fb440e0ff44640e9608d42280366e%7C765a8de5cf9444f09cafae5bf8cfa366%7C1&sdata=fo2Ew%2F2jyRAw6qYjeXNeVojO5QdY6k8yasJk1qiNhMQ%3D&reserved=0
Sent from the vufind-general mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/xeonphi _______________________________________________
VuFind-General mailing list
[hidden email]
https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.sourceforge.net%2Flists%2Flistinfo%2Fvufind-general&data=01%7C01%7Cdemian.katz%40villanova.edu%7Cc48fb440e0ff44640e9608d42280366e%7C765a8de5cf9444f09cafae5bf8cfa366%7C1&sdata=7a1esz1FSHgkmNW3vO4obJVPulEUVjLGZM61EDrfOQQ%3D&reserved=0
------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/xeonphi
_______________________________________________
VuFind-General mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/vufind-general
Loading...