From: James Moger Date: Fri, 27 Jun 2014 18:59:34 +0000 (-0400) Subject: Escape Lucene query values with hyphens X-Git-Tag: v1.6.1~73^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=5d41d9b88dfaab211ac58762d76461a88699e793;p=gitblit.git Escape Lucene query values with hyphens --- diff --git a/src/main/java/com/gitblit/tickets/TicketIndexer.java b/src/main/java/com/gitblit/tickets/TicketIndexer.java index 3929a000..98fe6977 100644 --- a/src/main/java/com/gitblit/tickets/TicketIndexer.java +++ b/src/main/java/com/gitblit/tickets/TicketIndexer.java @@ -143,7 +143,7 @@ public class TicketIndexer { private String escape(String value) { if (value.charAt(0) != '"') { - if (value.indexOf('/') > -1) { + if (value.indexOf('/') > -1 || value.indexOf('-') > -1) { return "\"" + value + "\""; } }