Search with slash character

432 views
Skip to first unread message

Edgar Rodríguez Silva

unread,
Feb 23, 2015, 4:10:41 AM2/23/15
to ica-ato...@googlegroups.com
Hello;

we have a lot of information objects with slash character in title, for example 2.543/1. When we search in the global search, we have to write it like  "2.543/1", in other way it doesn't work.

This behaviour is not user friendly, only people who knows this behaviour can search. Are there any way to config ElasticSearch to allow the slash in search without quotes? 

Regards

Edgar Rodríguez

David Juhasz

unread,
Feb 23, 2015, 1:16:02 PM2/23/15
to ica-ato...@googlegroups.com
Hi Edgar,

That's a good question.  Elasticsearch is very configurable, so I would expect you can change the search behaviour of the slash.  I would recommend checking out the Elasticsearch documentation or asking the Elasticseach community about this.  You can access both via http://www.elasticsearch.org/

Best,
David

--

David Juhasz
Director, AtoM Technical Services Artefactual Systems Inc. www.artefactual.com

--
You received this message because you are subscribed to the Google Groups "ICA-AtoM Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ica-atom-user...@googlegroups.com.
To post to this group, send email to ica-ato...@googlegroups.com.
Visit this group at http://groups.google.com/group/ica-atom-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/ica-atom-users/e425ca7f-5bc8-4176-b610-3784b4fd1c01%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Hutchinson, Tim

unread,
Feb 23, 2015, 1:19:04 PM2/23/15
to ica-ato...@googlegroups.com

Hi guys,

 

I just wanted to point out that there’s an open ticket about this:

https://projects.artefactual.com/issues/5850

 

I also found this:

https://github.com/elasticsearch/elasticsearch/issues/2980

 

Tim

 

 

Tim Hutchinson
Head, University Archives & Special Collections
University Library, University of Saskatchewan

Tel: (306) 966-6028  Fax: (306) 966-6040

Email: tim.hut...@usask.ca

Web: http://library.usask.ca/archives/

David Juhasz

unread,
Feb 23, 2015, 1:38:34 PM2/23/15
to ica-ato...@googlegroups.com
Thanks for the ticket and ES links Tim.  I notice the ES issue is filed against ES 0.9 and there is a fix merged to that branch. For AtoM 2.1.x we've upgraded to ES 1.3, which may have the merged fix?

--

David Juhasz
Director, AtoM Technical Services Artefactual Systems Inc. www.artefactual.com

Hutchinson, Tim

unread,
Feb 23, 2015, 1:42:23 PM2/23/15
to <ica-atom-users@googlegroups.com>
That was my first read too, but I think the commit might be for a different project or at least not the main release? In any case I can reproduce the error in our current 2,1 test environment.

Tim

Sent from my iPhone

David Juhasz

unread,
Feb 23, 2015, 1:50:12 PM2/23/15
to ica-ato...@googlegroups.com
Hmm, I just tested adding a Fonds with a slash to http://demo.accesstomemory.org (2.1.1). Oddly when I add a slash to a description identifier, I can search (via global search bar) for the identifier and get search results.  If I put a slash character in the description title however, a search on that string results in an error.

--

David Juhasz
Director, AtoM Technical Services Artefactual Systems Inc. www.artefactual.com

Hutchinson, Tim

unread,
Feb 23, 2015, 2:00:23 PM2/23/15
to ica-ato...@googlegroups.com

Interesting. But if you just search for part of the string (e.g. TEST/SLASH or SLASH/001), you get the error. More generally – it seems that an even number of slashes works, and an odd number returns the error.

 

Tim

David Juhasz

unread,
Feb 23, 2015, 3:51:54 PM2/23/15
to ica-ato...@googlegroups.com
Hmm, that is an *odd* error.  :P Sorry, I couldn't resist.

--

David Juhasz
Director, AtoM Technical Services Artefactual Systems Inc. www.artefactual.com

Hutchinson, Tim

unread,
Feb 23, 2015, 8:01:20 PM2/23/15
to <ica-atom-users@googlegroups.com>
I clued into why that's happening - the slash is being interpreted as part of a regular expression, so there needs to be a closing slash.

Tim

Sarah Romkey

unread,
Feb 24, 2015, 12:14:07 PM2/24/15
to ica-ato...@googlegroups.com
Thanks Tim- I see you updated the bug ticket (https://projects.artefactual.com/issues/5850) with a link to this thread.

Cheers,

Sarah

Sarah Romkey, MAS,MLIS
Systems Archivist
Artefactual Systems
604-527-2056
@ArchivesSarah



Johan Pieterse

unread,
Feb 24, 2016, 3:32:04 AM2/24/16
to ICA-AtoM Users
Hi all

I am still testing this but it seems to work if I add:
../apps/qubit/modules/search/actions/indexAclion.class.php
use Elastica\Util;

    $queryText = new \Elastica\Query\QueryString(Util::escapeTerm($request->query));

Regards

Johan Pieterse

unread,
Feb 24, 2016, 3:34:23 AM2/24/16
to ICA-AtoM Users


On Monday, February 23, 2015 at 11:10:41 AM UTC+2, Edgar Rodríguez Silva wrote:

Dan Gillean

unread,
Feb 29, 2016, 2:53:42 PM2/29/16
to ICA-AtoM Users
Hi Johan,

Thanks for these tips! Perhaps, once you've tested it thoroughly, you might consider submitting a patch or pull request to the public AtoM project? We have some information on doing so in our wiki:

See also:

Cheers,


Dan Gillean, MAS, MLIS
AtoM Program Manager
Artefactual Systems, Inc.
604-527-2056
@accesstomemory

--
You received this message because you are subscribed to the Google Groups "ICA-AtoM Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ica-atom-user...@googlegroups.com.
To post to this group, send email to ica-ato...@googlegroups.com.

Jim Adamson

unread,
Apr 12, 2016, 7:59:07 AM4/12/16
to ICA-AtoM Users
Thanks to Johan for the fix. I have tested this against AtoM 2.2 and can confirm it works. Just to note that I did have to make an edit to /usr/share/nginx/atom/vendor/Elastica/lib/Elastica/Util.php, as the $chars array didn't include forward slashes. This looks to be corrected in 2.3.x

Jim


Reply all
Reply to author
Forward
0 new messages