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

Mikhail Khludnev edited comment on SOLR-9685 at 5/10/18 8:47 PM:
-----------------------------------------------------------------

[~squallsama], I'm afraid the proposed syntax is a way verbose. I propose to 
think about particular usage. 
[Here|https://lucene.apache.org/solr/guide/7_1/json-query-dsl.html#use-json-query-dsl-in-json-request-api]
 we have 
{code}
{
    "query": {
        "bool": {
            "must_not": "{!frange u:3.0}ranking"
        }
    },
    "filter: [
        "title:solr",
        { "lucene" : {"df: "content", query : "lucene solr" }}
    ]
}
{code}
I'd like to tag it like this
{code}
{
    // too hairish snippet 
}
{code}

Opinions? 
*UPD*
repeating {{tag}} is boring, let's shorten it to the single hash like this
{code}
{
    "query": {
      "#top":{
          "bool": {
            "must_not": "{!frange u:3.0}ranking"
       }  }
    },
    "filter: [
        {"#title":"title:solr"},
        { "#content": {"lucene" : {"df: "content", query : "lucene solr" }}}
    ]
}
{code} 


was (Author: mkhludnev):
[~squallsama], I'm afraid the proposed syntax is a way verbose. I propose to 
think about particular usage. 
[Here|https://lucene.apache.org/solr/guide/7_1/json-query-dsl.html#use-json-query-dsl-in-json-request-api]
 we have 
{code}
{
    "query": {
        "bool": {
            "must_not": "{!frange u:3.0}ranking"
        }
    },
    "filter: [
        "title:solr",
        { "lucene" : {"df: "content", query : "lucene solr" }}
    ]
}
{code}
I'd like to tag it like this
{code}
{
    "query": {
        "bool": {
            "must_not": "{!frange u:3.0}ranking"
        },
       "tag":"top"
    },
    "filter: [
        {"query":"title:solr",   // the most tricky one  
          "tag":"title"
        },
        { "lucene" : {"df: "content", query : "lucene solr" },
          "tag":"content" 
        }
    ]
}
{code}

Opinions? 
*UPD*
repeating {{tag}} is boring, let's shorten it to the single hash like this
{code}
{
    "query": {
      "#top":{
          "bool": {
            "must_not": "{!frange u:3.0}ranking"
       }  }
    },
    "filter: [
        {"#title":"title:solr"},
        { "#content": {"lucene" : {"df: "content", query : "lucene solr" }}}
    ]
}
{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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to