(Oh my) Spans in Solr json request

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

(Oh my) Spans in Solr json request

Mikhail Khludnev-2
Hello,

Finally we let users to send span queries via XML (yeah) query parser. But I feel awkward to invoke XML under Json. Straightforward approach lead us to bunch of span[Or|And|Not|Etc] QParser plugins. Are there any more elegant ideas?  

--
Sincerely yours
Mikhail Khludnev
Reply | Threaded
Open this post in threaded view
|

Re: Intervals in Solr json request

Mikhail Khludnev-2
Thanks for your warm responses. I encounter Intervals, and considering introducing them in Solr JSON Request API. 
Following Query DSL approach gives me something like 
"interval":{  "or":["foo", 
                          "bar",
                           {"interval": { "unordered": 
                                    ["bag", 
                                      "baz",
                                      "ban",
                                       { "interval":{ "phrase": ["moo","foo"]} }
                                     ]}
                          } 
                        ], 
                   "field":"text_content"}
So, it implies creating {!inteval} query parser, which handles local param in a certain way, eg  it shouldn't support "or" and "phrase" an the same node.
Not sure how to propagate "filed" to term nodes.

I'd rather want to have more control over syntax and JsonQueryConverter.
 "interval":{  "or":["foo", 
                          "bar",
                           { "unordered": 
                                    ["bag", 
                                      "baz",
                                      "ban",
                                       { "phrase": ["moo","foo"]}
                                     ]}
                              }
                          ], 
                   "field":"text_content"}

Any ideas, preferences? 

On Sat, Sep 7, 2019 at 12:03 AM Mikhail Khludnev <[hidden email]> wrote:
Hello,

Finally we let users to send span queries via XML (yeah) query parser. But I feel awkward to invoke XML under Json. Straightforward approach lead us to bunch of span[Or|And|Not|Etc] QParser plugins. Are there any more elegant ideas?  

--
Sincerely yours
Mikhail Khludnev


--
Sincerely yours
Mikhail Khludnev
Reply | Threaded
Open this post in threaded view
|

Re: Intervals in Solr json request

Mikhail Khludnev-2
Ok. It might be a parser referring to a json object under some new property 

{
   "query": {
           "jinterval":"just a name"  // introducing new QPPlugin
      },
   "jparams": {                       // introducing new top-level entry
        "just a name": {
              "or":[    "foo", 
                          "bar",
                           { "unordered": 
                                    ["bag", 
                                      "baz",
                                      "ban",
                                       { "phrase": ["moo","foo"]}
                                     ]
                            }
                      ], 
               "field":"text_content"
             }
     }
}

Can we consider it as a spec for the new feature? 

On Sun, Sep 8, 2019 at 12:16 AM Mikhail Khludnev <[hidden email]> wrote:
Thanks for your warm responses. I encounter Intervals, and considering introducing them in Solr JSON Request API. 
Following Query DSL approach gives me something like 
"interval":{  "or":["foo", 
                          "bar",
                           {"interval": { "unordered": 
                                    ["bag", 
                                      "baz",
                                      "ban",
                                       { "interval":{ "phrase": ["moo","foo"]} }
                                     ]}
                          } 
                        ], 
                   "field":"text_content"}
So, it implies creating {!inteval} query parser, which handles local param in a certain way, eg  it shouldn't support "or" and "phrase" an the same node.
Not sure how to propagate "filed" to term nodes.

I'd rather want to have more control over syntax and JsonQueryConverter.
 "interval":{  "or":["foo", 
                          "bar",
                           { "unordered": 
                                    ["bag", 
                                      "baz",
                                      "ban",
                                       { "phrase": ["moo","foo"]}
                                     ]}
                              }
                          ], 
                   "field":"text_content"}

Any ideas, preferences? 

On Sat, Sep 7, 2019 at 12:03 AM Mikhail Khludnev <[hidden email]> wrote:
Hello,

Finally we let users to send span queries via XML (yeah) query parser. But I feel awkward to invoke XML under Json. Straightforward approach lead us to bunch of span[Or|And|Not|Etc] QParser plugins. Are there any more elegant ideas?  

--
Sincerely yours
Mikhail Khludnev


--
Sincerely yours
Mikhail Khludnev


--
Sincerely yours
Mikhail Khludnev
Reply | Threaded
Open this post in threaded view
|

Re: Intervals in Solr json request

Jason Gerlowski
Hi Mikhail,

I'm having trouble understanding the exact syntax you're proposing.
Is there a jira where the syntax is described in a little more detail?
 If not, would you care to put together a writeup on a jira somewhere?
 It's hard (for me at least) to weigh in as things are currently.

Best,

Jason

On Sun, Sep 8, 2019 at 3:25 PM Mikhail Khludnev <[hidden email]> wrote:

>
> Ok. It might be a parser referring to a json object under some new property
>
> {
>    "query": {
>            "jinterval":"just a name"  // introducing new QPPlugin
>       },
>    "jparams": {                       // introducing new top-level entry
>         "just a name": {
>               "or":[    "foo",
>                           "bar",
>                            { "unordered":
>                                     ["bag",
>                                       "baz",
>                                       "ban",
>                                        { "phrase": ["moo","foo"]}
>                                      ]
>                             }
>                       ],
>                "field":"text_content"
>              }
>      }
> }
>
> Can we consider it as a spec for the new feature?
>
> On Sun, Sep 8, 2019 at 12:16 AM Mikhail Khludnev <[hidden email]> wrote:
>>
>> Thanks for your warm responses. I encounter Intervals, and considering introducing them in Solr JSON Request API.
>> Following Query DSL approach gives me something like
>> "interval":{  "or":["foo",
>>                           "bar",
>>                            {"interval": { "unordered":
>>                                     ["bag",
>>                                       "baz",
>>                                       "ban",
>>                                        { "interval":{ "phrase": ["moo","foo"]} }
>>                                      ]}
>>                           }
>>                         ],
>>                    "field":"text_content"}
>> So, it implies creating {!inteval} query parser, which handles local param in a certain way, eg  it shouldn't support "or" and "phrase" an the same node.
>> Not sure how to propagate "filed" to term nodes.
>>
>> I'd rather want to have more control over syntax and JsonQueryConverter.
>>  "interval":{  "or":["foo",
>>                           "bar",
>>                            { "unordered":
>>                                     ["bag",
>>                                       "baz",
>>                                       "ban",
>>                                        { "phrase": ["moo","foo"]}
>>                                      ]}
>>                               }
>>                           ],
>>                    "field":"text_content"}
>>
>> Any ideas, preferences?
>>
>> On Sat, Sep 7, 2019 at 12:03 AM Mikhail Khludnev <[hidden email]> wrote:
>>>
>>> Hello,
>>>
>>> Finally we let users to send span queries via XML (yeah) query parser. But I feel awkward to invoke XML under Json. Straightforward approach lead us to bunch of span[Or|And|Not|Etc] QParser plugins. Are there any more elegant ideas?
>>>
>>> --
>>> Sincerely yours
>>> Mikhail Khludnev
>>
>>
>>
>> --
>> Sincerely yours
>> Mikhail Khludnev
>
>
>
> --
> Sincerely yours
> Mikhail Khludnev

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Intervals in Solr json request

Mikhail Khludnev-2

On Mon, Sep 16, 2019 at 3:05 PM Jason Gerlowski <[hidden email]> wrote:
Hi Mikhail,

I'm having trouble understanding the exact syntax you're proposing.
Is there a jira where the syntax is described in a little more detail?
 If not, would you care to put together a writeup on a jira somewhere?
 It's hard (for me at least) to weigh in as things are currently.

Best,

Jason

On Sun, Sep 8, 2019 at 3:25 PM Mikhail Khludnev <[hidden email]> wrote:
>
> Ok. It might be a parser referring to a json object under some new property
>
> {
>    "query": {
>            "jinterval":"just a name"  // introducing new QPPlugin
>       },
>    "jparams": {                       // introducing new top-level entry
>         "just a name": {
>               "or":[    "foo",
>                           "bar",
>                            { "unordered":
>                                     ["bag",
>                                       "baz",
>                                       "ban",
>                                        { "phrase": ["moo","foo"]}
>                                      ]
>                             }
>                       ],
>                "field":"text_content"
>              }
>      }
> }
>
> Can we consider it as a spec for the new feature?
>
> On Sun, Sep 8, 2019 at 12:16 AM Mikhail Khludnev <[hidden email]> wrote:
>>
>> Thanks for your warm responses. I encounter Intervals, and considering introducing them in Solr JSON Request API.
>> Following Query DSL approach gives me something like
>> "interval":{  "or":["foo",
>>                           "bar",
>>                            {"interval": { "unordered":
>>                                     ["bag",
>>                                       "baz",
>>                                       "ban",
>>                                        { "interval":{ "phrase": ["moo","foo"]} }
>>                                      ]}
>>                           }
>>                         ],
>>                    "field":"text_content"}
>> So, it implies creating {!inteval} query parser, which handles local param in a certain way, eg  it shouldn't support "or" and "phrase" an the same node.
>> Not sure how to propagate "filed" to term nodes.
>>
>> I'd rather want to have more control over syntax and JsonQueryConverter.
>>  "interval":{  "or":["foo",
>>                           "bar",
>>                            { "unordered":
>>                                     ["bag",
>>                                       "baz",
>>                                       "ban",
>>                                        { "phrase": ["moo","foo"]}
>>                                      ]}
>>                               }
>>                           ],
>>                    "field":"text_content"}
>>
>> Any ideas, preferences?
>>
>> On Sat, Sep 7, 2019 at 12:03 AM Mikhail Khludnev <[hidden email]> wrote:
>>>
>>> Hello,
>>>
>>> Finally we let users to send span queries via XML (yeah) query parser. But I feel awkward to invoke XML under Json. Straightforward approach lead us to bunch of span[Or|And|Not|Etc] QParser plugins. Are there any more elegant ideas?
>>>
>>> --
>>> Sincerely yours
>>> Mikhail Khludnev
>>
>>
>>
>> --
>> Sincerely yours
>> Mikhail Khludnev
>
>
>
> --
> Sincerely yours
> Mikhail Khludnev

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]



--
Sincerely yours
Mikhail Khludnev
Reply | Threaded
Open this post in threaded view
|

Re: Intervals in Solr json request

Mikhail Khludnev-2
In reply to this post by Jason Gerlowski

On Mon, Sep 16, 2019 at 3:05 PM Jason Gerlowski <[hidden email]> wrote:
Hi Mikhail,

I'm having trouble understanding the exact syntax you're proposing.
Is there a jira where the syntax is described in a little more detail?
 If not, would you care to put together a writeup on a jira somewhere?
 It's hard (for me at least) to weigh in as things are currently.

Best,

Jason

On Sun, Sep 8, 2019 at 3:25 PM Mikhail Khludnev <[hidden email]> wrote:
>
> Ok. It might be a parser referring to a json object under some new property
>
> {
>    "query": {
>            "jinterval":"just a name"  // introducing new QPPlugin
>       },
>    "jparams": {                       // introducing new top-level entry
>         "just a name": {
>               "or":[    "foo",
>                           "bar",
>                            { "unordered":
>                                     ["bag",
>                                       "baz",
>                                       "ban",
>                                        { "phrase": ["moo","foo"]}
>                                      ]
>                             }
>                       ],
>                "field":"text_content"
>              }
>      }
> }
>
> Can we consider it as a spec for the new feature?
>
> On Sun, Sep 8, 2019 at 12:16 AM Mikhail Khludnev <[hidden email]> wrote:
>>
>> Thanks for your warm responses. I encounter Intervals, and considering introducing them in Solr JSON Request API.
>> Following Query DSL approach gives me something like
>> "interval":{  "or":["foo",
>>                           "bar",
>>                            {"interval": { "unordered":
>>                                     ["bag",
>>                                       "baz",
>>                                       "ban",
>>                                        { "interval":{ "phrase": ["moo","foo"]} }
>>                                      ]}
>>                           }
>>                         ],
>>                    "field":"text_content"}
>> So, it implies creating {!inteval} query parser, which handles local param in a certain way, eg  it shouldn't support "or" and "phrase" an the same node.
>> Not sure how to propagate "filed" to term nodes.
>>
>> I'd rather want to have more control over syntax and JsonQueryConverter.
>>  "interval":{  "or":["foo",
>>                           "bar",
>>                            { "unordered":
>>                                     ["bag",
>>                                       "baz",
>>                                       "ban",
>>                                        { "phrase": ["moo","foo"]}
>>                                      ]}
>>                               }
>>                           ],
>>                    "field":"text_content"}
>>
>> Any ideas, preferences?
>>
>> On Sat, Sep 7, 2019 at 12:03 AM Mikhail Khludnev <[hidden email]> wrote:
>>>
>>> Hello,
>>>
>>> Finally we let users to send span queries via XML (yeah) query parser. But I feel awkward to invoke XML under Json. Straightforward approach lead us to bunch of span[Or|And|Not|Etc] QParser plugins. Are there any more elegant ideas?
>>>
>>> --
>>> Sincerely yours
>>> Mikhail Khludnev
>>
>>
>>
>> --
>> Sincerely yours
>> Mikhail Khludnev
>
>
>
> --
> Sincerely yours
> Mikhail Khludnev

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]



--
Sincerely yours
Mikhail Khludnev