[Bug 19197] New: Lower case "or" results in broken ElasticSearch queries

classic Classic list List threaded Threaded
17 messages Options
Reply | Threaded
Open this post in threaded view
|

[Bug 19197] New: Lower case "or" results in broken ElasticSearch queries

bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19197

            Bug ID: 19197
           Summary: Lower case "or" results in broken ElasticSearch
                    queries
 Change sponsored?: ---
           Product: Koha
           Version: master
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P5 - low
         Component: Searching
          Assignee: [hidden email]
          Reporter: [hidden email]
        QA Contact: [hidden email]

In some places a literal "or" is used to build search queries which probably
works with Zebra, but not with ElasticSearch. Replacing theses occurrences
fixes the problem in those cases. This is just a band aid, not addressing the
real issue which is (I guess) that a query abstraction interface is needed, and
zebra-specific syntax should not be used directly in search queries, but this
will at least solve this particular issue.

--
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 19197] Lower case "or" results in broken ElasticSearch queries

bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19197

--- Comment #1 from David Gustafsson <[hidden email]> ---
Created attachment 66583
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=66583&action=edit
Change hardcoded instances of lower case "or" in search queries to be
compatible with ElasticSearch query syntax

--
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 19197] Lower case "or" results in broken ElasticSearch queries

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19197

Katrin Fischer <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[hidden email]

--- Comment #2 from Katrin Fischer <[hidden email]> ---
I think there are also some cases for or/OR in the XSLT templates probably.

--
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 19197] Lower case "or" results in broken ElasticSearch queries

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19197

Jonathan Druart <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         QA Contact|[hidden email]-communit |
                   |y.org                       |
                 CC|                            |[hidden email]-c
                   |                            |ommunity.org
          Component|Searching                   |Searching - Elasticsearch

--
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 19197] Lower case "or" results in broken ElasticSearch queries

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19197

David Gustafsson <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |Needs Signoff

--
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 19197] Lower case "or" results in broken ElasticSearch queries

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19197

David Gustafsson <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|[hidden email]-commun |[hidden email]
                   |ity.org                     |

--
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 19197] Lower case "or" results in broken ElasticSearch queries

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19197

David Gustafsson <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #66583|0                           |1
        is obsolete|                            |

--- Comment #3 from David Gustafsson <[hidden email]> ---
Created attachment 75114
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=75114&action=edit
Change hardcoded instances of lower case "or" in search queries to be
compatible with ElasticSearch query syntax

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 19197] Lower case "or" results in broken ElasticSearch queries

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19197

--- Comment #4 from David Gustafsson <[hidden email]> ---
Rebased against Koha master.

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 19197] Lower case "or" results in broken ElasticSearch queries

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19197

Cab Vinton <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[hidden email]

--- Comment #5 from Cab Vinton <[hidden email]> ---
Unable to apply patch to either Sandbox 11 or 13.

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 19197] Lower case "or" results in broken ElasticSearch queries

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19197

M. Tompsett <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #75114|0                           |1
        is obsolete|                            |

--- Comment #6 from M. Tompsett <[hidden email]> ---
Created attachment 80688
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=80688&action=edit
Bug 19197: Change lower case "or" to upper case

This makes the search queries compatible with ElasticSearch query syntax

-- rebased by Mark Tompsett <[hidden email]>

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 19197] Lower case "or" results in broken ElasticSearch queries

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19197

Marjorie Barry-Vila <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |marjorie.barry-vila@collect
                   |                            |o.ca

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 19197] Lower case "or" results in broken ElasticSearch queries

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19197

Nick Clemens <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #80688|0                           |1
        is obsolete|                            |

--- Comment #7 from Nick Clemens <[hidden email]> ---
Created attachment 92607
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=92607&action=edit
Bug 19197: Fix multibranch limits in ElasticSearch

Two issues here:
1 - OR must be capitalized
2 - The 'branch' is not analyzed and turned into 'homebranch' correctly. If we
specify 'homebranch' we can later build in a 'holdingbranch' search too

To test:
 1 - Go to Administration -> Library Groups
 2 - Create a search group for staff and opac
 3 - Add two libraries
 4 - Perform an advanced search, limit to the group you just created
 5 - Note the number of results
 6 - Switch SearchEngine syspref to 'Elasticsearch'
 7 - Repeat search, note it fails
 8 - Apply patch
 9 - Restart all the things
10 - Repeat the search
11 - Success! Number of results should match previous search
12 - Switch SearchEngine to 'Zebra'
13 - Repeat search
14 - Success! Search works and number of results matches

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 19197] Lower case "or" results in broken ElasticSearch queries

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19197

Séverine Queune <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[hidden email]
             Status|Needs Signoff               |Failed QA

--- Comment #8 from Séverine Queune <[hidden email]> ---
The patch works perfectly with ElasticSearch, whatever I search, using the
search group.
But with Zebra, the search fails if "or" is a term I want to search (worked
with ElasticSearch).

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 19197] Lower case "or" results in broken ElasticSearch queries

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19197

--- Comment #9 from David Gustafsson <[hidden email]> ---
Since this issue seams to have gone people by but the same changes has been
introduced in Bug 23322 and bug 24506 respectively I will obsolete the current
patch. Found another occurrence of hard coded boolean operator in
bulkmarcimport.pl though.

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 19197] Lower case "or" results in broken ElasticSearch queries

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19197

David Gustafsson <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|Failed QA                   |RESOLVED

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 19197] Lower case "or" results in broken ElasticSearch queries

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19197

David Gustafsson <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|FIXED                       |DUPLICATE

--- Comment #10 from David Gustafsson <[hidden email]> ---


*** This bug has been marked as a duplicate of bug 23322 ***

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 19197] Lower case "or" results in broken ElasticSearch queries

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19197

--- Comment #11 from David Gustafsson <[hidden email]> ---
Created new issue for this (Bug 25616).

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/