Demo Discussion
Forum Config Examples Contributions Vulnerabilities
  Discussion forum about ELOG  Not logged in ELOG logo
icon5.gif   Attribute option "+x" not searcheable, posted by Stefano Lacaprara on Mon Oct 23 11:47:50 2017 
    icon2.gif   Re: Attribute option "+x" not searcheable, posted by Andreas Luedeke on Sat Oct 28 09:12:32 2017 
       icon2.gif   Re: Attribute option "+x" not searcheable, posted by Andreas Luedeke on Tue Oct 31 16:56:24 2017 
Message ID: 68695     Entry time: Sat Oct 28 09:12:32 2017     In reply to: 68694     Reply to this: 68697
Icon: Reply  Author: Andreas Luedeke  Author Email: andreas.luedeke@psi.ch 
Category: Question  OS: Linux  ELOG Version: V3.1.1-0767eb0 
Subject: Re: Attribute option "+x" not searcheable 
Hi Stefano,
you could try to html encode the "+" and "-" sign in the option list
Options Half = +x, -x, both
Allow HTML = 1

But of course then you would need to change all existing entries.

It is just an idea; I did not try this out, it might not work anyway.

Cheers
Andreas

> Dear experts,
>    I have an elog with an attribute with fixed values, like this:
> 
> Attributes = Half
> Options Half = +x, -x, both
> 
> It works fine, but I would like to find (or quick filter) all entries with Half=+x .
> 
> If I go to the search form, I can select +x from the dropdown menu for Half, but the search returns no result, even if I do have a number of entries with Half=+x. Likewise if I try to do the same with Quick filter.
> 
> I believe that this is due to the fact that the search uses regex, and "+" is reserved. I've tried to perform a search by entering manually and escaped "\+x", and it works as intended.
> 
> https://.../?mode=summary&reverse=0&reverse=1&npp=20&Half=%5E%5C%2Bx%24
> 
> However, since this attribute has a list of fixed values, it is not possible to entry manually something different "\+x" than what is defined in the config, that is "+x".
> 
> Is there a solution for this problem?
> 
> I would rather not change the attributes options (to, say, positive/negative), since that would mean changing manually a non negligible number of entries.
> 
> thanks,
>   Stefano
ELOG V3.1.5-fe60aaf