[Nepomuk] RFC: The grammar of the new Nepomuk query parser
Denis Steckelmacher
steckdenis at yahoo.fr
Wed May 29 14:26:08 UTC 2013
On 05/29/2013 04:07 PM, Ivan Čukić wrote:
> Hi Denis,
>
> The proposal looks quite nice. If I may, I'd suggest a shorthand for the
> hasTag - for example #dog to mean hasTag:dog.*
>
> One of the reasons (apart from greater usability) is that according to the
> proposal hasTag:red herring would mean either
> - hasTag:"red herring"
> - hasTag:red contains:herring (implied property contains)
> - hasTag:red hasTag:herring (implied property hasTag)
>
> By allowing a shorthand for hasTag, you remove the need for that property to
> be an implied one.
>
>
> Cheerio,
> Ivan
>
> * firefox uses + for this, but I guess that # is more widely known thanks to
> twitter-like services.
>
Hi,
This is a great idea ! A string beginning with a # could be considered
to be a tag and nothing else, and the lexer can be made to end
#-prefixed strings at the first space encountered (thus making them
one-word strings).
I would not remove the implied hasTag, though, as I think that the
parser must remain friendly to very non-technical people that don't know
the hashtag syntax or don't know they can use it in a Nepomuk query
field. If I type "holidays" in KRunner, and I have a "holidays" tag, the
most pertinent result would be the list of my documents having been
tagged as "holidays".
Denis.
More information about the Nepomuk
mailing list