lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yonik Seeley (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (SOLR-9685) tag a query in JSON syntax
Date Thu, 17 May 2018 23:47:00 GMT

    [ https://issues.apache.org/jira/browse/SOLR-9685?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16479895#comment-16479895
] 

Yonik Seeley commented on SOLR-9685:
------------------------------------

Thanks Mikhail, I like the syntax!

.bq omitting leading # is illegal and causes exception

Not really... valid queries are also of the form { "query_type" : "query_val }, so the "#"
disambiguates between a query type and a tag.  For example, "join" would cause a join query
to be parsed, while "#join" would mean a tag.

.bq Leading # is kept in the tag name.

That will cause confusion for people switching between multiple styles of tagging.  We already
have established uses of tags without hashes in them:
{code}
fq={!tag=color}item_color:blue
{code}
Also, we already have a way to add multiple tags via comma separation:
{code}
fq={!tag=color,item_description}item_color:blue
{code}
So the JSON equivalent should be: 
{code}
{ "#color,item_description" : "item_color:blue" }
{code}


> tag a query in JSON syntax
> --------------------------
>
>                 Key: SOLR-9685
>                 URL: https://issues.apache.org/jira/browse/SOLR-9685
>             Project: Solr
>          Issue Type: Improvement
>      Security Level: Public(Default Security Level. Issues are Public) 
>          Components: Facet Module, JSON Request API
>            Reporter: Yonik Seeley
>            Priority: Major
>          Time Spent: 1.5h
>  Remaining Estimate: 0h
>
> There should be a way to tag a query/filter in JSON syntax.
> Perhaps these two forms could be equivalent:
> {code}
> "{!tag=COLOR}color:blue"
> { tagged : { COLOR : "color:blue" }
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message