Re: configuring suggester with api

2020-03-12 Thread Manoj Sonawane
according to docs at  lucene.apache.org/solr/guide/8_4/suggester.html#
 that parameter
is optional ( i am supplying it as url param). I guess i have a problem
with JSON payload  to create suggester, but in that case api should error
out.


On Thu, Mar 12, 2020 at 8:57 PM Audrey Lorberfeld -
audrey.lorberf...@ibm.com  wrote:

> Hi Manoj,
>
> In the handler, I think you are missing the suggest.dictionary parameter,
> which should be set to the name of your suggestion component. In this case,
> I believe it would should be set to "titleSuggester."
>
> In this sample URL from the documentation, they have a suggest.dictionary
> field, and our suggester (which is working) also has this field:
>
>
> http://localhost:8983/solr/techproducts/suggest?suggest=true=true=mySuggester=c=memory
>
> On 3/12/20, 6:33 AM, "Manoj Sonawane"  wrote:
>
> Hello,
> I am trying to learn solr config api and having problem creating
> suggester.
> Any pointers will be appriciated
>
> suggester has been setup with
>
> curl -X POST -H 'Content-type:application/json' --data-binary '{
>  "add-searchcomponent": {
>   "class": "solr.SuggestComponent",
>   "name": "titleSuggester",
>   "lookupImpl": "FuzzyLookupFactory",
>   "dictionaryImpl": "DocumentDictionaryFactory",
>   "field": "title_facet",
>   "suggestAnalyzerFieldType": "string",
>   "buildOnStartup": true
>  }
> }'
> https://urldefense.proofpoint.com/v2/url?u=http-3A__localhost-3A8983_solr_jn-5Fcore_config=DwIBaQ=jf_iaSHvJObTbx-siA1ZOg=_8ViuZIeSRdQjONA8yHWPZIBlhj291HU3JpNIx5a55M=oHg3GLNhQJ-kkES97kG61N0D5XFZL3_9tYDftuTVsAw=XcEmA461wpbfslh7bRr8nvm3l5uxEjiSwpvoXh6j7yU=
>
>
> and corresponding handler
>
>
> echo
> echo "setting up suggest handler"
> curl -X POST -H 'Content-type:application/json' --data-binary '{
>  "update-requesthandler": {
>   "name": "/suggest",
>   "startup": "lazy",
>   "class": "solr.SearchHandler",
>   "defaults": {
>"suggest": true,
>"suggest.count": 10
>   },
>   "components": ["titleSuggester"]
>  }
> }'
> https://urldefense.proofpoint.com/v2/url?u=http-3A__localhost-3A8983_solr_jn-5Fcore_config=DwIBaQ=jf_iaSHvJObTbx-siA1ZOg=_8ViuZIeSRdQjONA8yHWPZIBlhj291HU3JpNIx5a55M=oHg3GLNhQJ-kkES97kG61N0D5XFZL3_9tYDftuTVsAw=XcEmA461wpbfslh7bRr8nvm3l5uxEjiSwpvoXh6j7yU=
>
>
> it seems to be configured
>
>
>
> https://urldefense.proofpoint.com/v2/url?u=http-3A__localhost-3A8983_solr_jn-5Fcore_config_searchComponent-3FcomponentName-3DtitleSuggester=DwIBaQ=jf_iaSHvJObTbx-siA1ZOg=_8ViuZIeSRdQjONA8yHWPZIBlhj291HU3JpNIx5a55M=oHg3GLNhQJ-kkES97kG61N0D5XFZL3_9tYDftuTVsAw=SUaeM-ToDFByyJFjszLpgEYQdumajHcpV9NJHLQW6bE=
>
> {
>   "responseHeader":{
> "status":0,
> "QTime":1},
>   "config":{"searchComponent":{"titleSuggester":{
> "class":"solr.SuggestComponent",
> "name":"titleSuggester",
> "lookupImpl":"FuzzyLookupFactory",
> "dictionaryImpl":"DocumentDictionaryFactory",
> "field":"title_facet",
> "suggestAnalyzerFieldType":"string",
> "buildOnStartup":true
>
> but solr returns "No suggester named titleSuggester was configured"
>
> https://urldefense.proofpoint.com/v2/url?u=http-3A__localhost-3A8983_solr_jn-5Fcore_suggest-3Fsuggest-3Dtrue-26suggest.build-3Dtrue-26suggest.q-3Delec-26suggest.dictionary-3DtitleSuggester=DwIBaQ=jf_iaSHvJObTbx-siA1ZOg=_8ViuZIeSRdQjONA8yHWPZIBlhj291HU3JpNIx5a55M=oHg3GLNhQJ-kkES97kG61N0D5XFZL3_9tYDftuTVsAw=IPWieKPIiDvS2ezg3JeIIc9xWsgZ7F1VriGtAdab0Q8=
>
>   "responseHeader":{
>
> "status":400,
> "QTime":0},
>   "error":{
> "metadata":[
>   "error-class","org.apache.solr.common.SolrException",
>   "root-error-class","org.apache.solr.common.SolrException"],
> "msg":"No suggester named titleSuggester was configured",
> "code":400}}
>
>
>


Re: How to query with FL field lower than some value?

2020-03-12 Thread GTHell
Many thank your solution! When I read the doc I didn't notice that the frange
accept function. Now I'm able to calculate the distance and get the result
that's only below 0.5

Again thank :)



--
Sent from: https://lucene.472066.n3.nabble.com/Solr-User-f472068.html


Secure communication between Solr and Zookeeper

2020-03-12 Thread Kirk Fitzsimons


Is it possible to secure communication between Solr(8.3.1) and Zookeeper
(3.5.5)?

We have followed the guide
https://cwiki.apache.org/confluence/display/ZOOKEEPER/ZooKeeper+SSL+User
+Guide

When we try the below command it hangs and fails to connect to zookeeper.

solr/server/scripts/cloud-scripts$ ./zkcli.sh -zkhost localhost:2281 -cmd
ls
INFO  - 2020-03-12 14:08:41.438;
org.apache.solr.common.cloud.ConnectionManager; Waiting for client to
connect to ZooKeeper

In the zookeeper logs we can see the following error:

io.netty.handler.codec.DecoderException:
io.netty.handler.ssl.NotSslRecordException: not an SSL/TLS record

Kirk Fitzsimons


Secure communication between Solr and Zookeeper

2020-03-12 Thread Kirk Fitzsimons


Is it possible to secure communication between Solr(8.3.1) and Zookeeper
(3.5.5)?

We have followed the guide
https://cwiki.apache.org/confluence/display/ZOOKEEPER/ZooKeeper+SSL+User
+Guide

When we try the below command it hangs and fails to connect to zookeeper.

solr/server/scripts/cloud-scripts$ ./zkcli.sh -zkhost localhost:2281 -cmd
ls
INFO  - 2020-03-12 14:08:41.438;
org.apache.solr.common.cloud.ConnectionManager; Waiting for client to
connect to ZooKeeper

In the zookeeper logs we can see the following error:

io.netty.handler.codec.DecoderException:
io.netty.handler.ssl.NotSslRecordException: not an SSL/TLS record

Kirk Fitzsimons


How to use InetAccessHandler?

2020-03-12 Thread Ryan W
Does anyone have an example of how InetAccessHandler is implemented?  My
jetty version is 9.4.14.

Will I be able to whitelist IP addresses just by dropping a
jetty-inetaccess.xml file in my server/etc directory?  Are there other
steps required?

If this is the right way to do it, what is the proper syntax for
whitelisting an IP address in a file like this:
https://fossies.org/linux/jetty-distribution/modules/inetaccess/jetty-inetaccess.xml


Thanks,
Ryan


Re: Restrict access to admin interface by IP address in Solr 7.7.2

2020-03-12 Thread Ryan W
It looks like IPAccessHandler is deprecated in my version of jetty (9.4.14)
in favor of InetAccessHandler.  However, I can find no information or
examples of how to implement InetAccessHandler.  I see some disembodied
code examples here and there, but no indication of where and how to
implement.

On Wed, Mar 11, 2020 at 6:25 PM Jan Høydahl  wrote:

> That should still work if you follow Jetty’s procedures for the version of
> Jetty you’re at.
> In 8.5 this will be much simpler:
> https://issues.apache.org/jira/browse/SOLR-14136
>
> Jan
>
> > 11. mar. 2020 kl. 20:39 skrev Ryan W :
> >
> > What options do I have for restricting access to the admin UI by IP
> > address?  In Solr 6.x, this could be done with an IPAccessHandler in
> > jetty.xml, but this doesn't seem to work in Solr 7.x.  Is there some
> other
> > way to do it?
> >
> > Thanks!
>
>


Re: configuring suggester with api

2020-03-12 Thread Audrey Lorberfeld - audrey.lorberf...@ibm.com
Hi Manoj,

In the handler, I think you are missing the suggest.dictionary parameter, which 
should be set to the name of your suggestion component. In this case, I believe 
it would should be set to "titleSuggester."

In this sample URL from the documentation, they have a suggest.dictionary 
field, and our suggester (which is working) also has this field: 

http://localhost:8983/solr/techproducts/suggest?suggest=true=true=mySuggester=c=memory

On 3/12/20, 6:33 AM, "Manoj Sonawane"  wrote:

Hello,
I am trying to learn solr config api and having problem creating suggester.
Any pointers will be appriciated

suggester has been setup with

curl -X POST -H 'Content-type:application/json' --data-binary '{
 "add-searchcomponent": {
  "class": "solr.SuggestComponent",
  "name": "titleSuggester",
  "lookupImpl": "FuzzyLookupFactory",
  "dictionaryImpl": "DocumentDictionaryFactory",
  "field": "title_facet",
  "suggestAnalyzerFieldType": "string",
  "buildOnStartup": true
 }
}' 
https://urldefense.proofpoint.com/v2/url?u=http-3A__localhost-3A8983_solr_jn-5Fcore_config=DwIBaQ=jf_iaSHvJObTbx-siA1ZOg=_8ViuZIeSRdQjONA8yHWPZIBlhj291HU3JpNIx5a55M=oHg3GLNhQJ-kkES97kG61N0D5XFZL3_9tYDftuTVsAw=XcEmA461wpbfslh7bRr8nvm3l5uxEjiSwpvoXh6j7yU=
 


and corresponding handler


echo
echo "setting up suggest handler"
curl -X POST -H 'Content-type:application/json' --data-binary '{
 "update-requesthandler": {
  "name": "/suggest",
  "startup": "lazy",
  "class": "solr.SearchHandler",
  "defaults": {
   "suggest": true,
   "suggest.count": 10
  },
  "components": ["titleSuggester"]
 }
}' 
https://urldefense.proofpoint.com/v2/url?u=http-3A__localhost-3A8983_solr_jn-5Fcore_config=DwIBaQ=jf_iaSHvJObTbx-siA1ZOg=_8ViuZIeSRdQjONA8yHWPZIBlhj291HU3JpNIx5a55M=oHg3GLNhQJ-kkES97kG61N0D5XFZL3_9tYDftuTVsAw=XcEmA461wpbfslh7bRr8nvm3l5uxEjiSwpvoXh6j7yU=
 


it seems to be configured



https://urldefense.proofpoint.com/v2/url?u=http-3A__localhost-3A8983_solr_jn-5Fcore_config_searchComponent-3FcomponentName-3DtitleSuggester=DwIBaQ=jf_iaSHvJObTbx-siA1ZOg=_8ViuZIeSRdQjONA8yHWPZIBlhj291HU3JpNIx5a55M=oHg3GLNhQJ-kkES97kG61N0D5XFZL3_9tYDftuTVsAw=SUaeM-ToDFByyJFjszLpgEYQdumajHcpV9NJHLQW6bE=
 

{
  "responseHeader":{
"status":0,
"QTime":1},
  "config":{"searchComponent":{"titleSuggester":{
"class":"solr.SuggestComponent",
"name":"titleSuggester",
"lookupImpl":"FuzzyLookupFactory",
"dictionaryImpl":"DocumentDictionaryFactory",
"field":"title_facet",
"suggestAnalyzerFieldType":"string",
"buildOnStartup":true

but solr returns "No suggester named titleSuggester was configured"

https://urldefense.proofpoint.com/v2/url?u=http-3A__localhost-3A8983_solr_jn-5Fcore_suggest-3Fsuggest-3Dtrue-26suggest.build-3Dtrue-26suggest.q-3Delec-26suggest.dictionary-3DtitleSuggester=DwIBaQ=jf_iaSHvJObTbx-siA1ZOg=_8ViuZIeSRdQjONA8yHWPZIBlhj291HU3JpNIx5a55M=oHg3GLNhQJ-kkES97kG61N0D5XFZL3_9tYDftuTVsAw=IPWieKPIiDvS2ezg3JeIIc9xWsgZ7F1VriGtAdab0Q8=
 

  "responseHeader":{

"status":400,
"QTime":0},
  "error":{
"metadata":[
  "error-class","org.apache.solr.common.SolrException",
  "root-error-class","org.apache.solr.common.SolrException"],
"msg":"No suggester named titleSuggester was configured",
"code":400}}




configuring suggester with api

2020-03-12 Thread Manoj Sonawane
Hello,
I am trying to learn solr config api and having problem creating suggester.
Any pointers will be appriciated

suggester has been setup with

curl -X POST -H 'Content-type:application/json' --data-binary '{
 "add-searchcomponent": {
  "class": "solr.SuggestComponent",
  "name": "titleSuggester",
  "lookupImpl": "FuzzyLookupFactory",
  "dictionaryImpl": "DocumentDictionaryFactory",
  "field": "title_facet",
  "suggestAnalyzerFieldType": "string",
  "buildOnStartup": true
 }
}' http://localhost:8983/solr/jn_core/config


and corresponding handler


echo
echo "setting up suggest handler"
curl -X POST -H 'Content-type:application/json' --data-binary '{
 "update-requesthandler": {
  "name": "/suggest",
  "startup": "lazy",
  "class": "solr.SearchHandler",
  "defaults": {
   "suggest": true,
   "suggest.count": 10
  },
  "components": ["titleSuggester"]
 }
}' http://localhost:8983/solr/jn_core/config


it seems to be configured


http://localhost:8983/solr/jn_core/config/searchComponent?componentName=titleSuggester

{
  "responseHeader":{
"status":0,
"QTime":1},
  "config":{"searchComponent":{"titleSuggester":{
"class":"solr.SuggestComponent",
"name":"titleSuggester",
"lookupImpl":"FuzzyLookupFactory",
"dictionaryImpl":"DocumentDictionaryFactory",
"field":"title_facet",
"suggestAnalyzerFieldType":"string",
"buildOnStartup":true

but solr returns "No suggester named titleSuggester was configured"
http://localhost:8983/solr/jn_core/suggest?suggest=true=true=elec=titleSuggester

  "responseHeader":{

"status":400,
"QTime":0},
  "error":{
"metadata":[
  "error-class","org.apache.solr.common.SolrException",
  "root-error-class","org.apache.solr.common.SolrException"],
"msg":"No suggester named titleSuggester was configured",
"code":400}}


configuring suggester with api

2020-03-12 Thread Manoj Sonawane
Hello,
I am trying to learn solr config api and having problem creating suggester.
Any pointers will be appriciated

suggester has been setup with

curl -X POST -H 'Content-type:application/json' --data-binary '{
 "add-searchcomponent": {
  "class": "solr.SuggestComponent",
  "name": "titleSuggester",
  "lookupImpl": "FuzzyLookupFactory",
  "dictionaryImpl": "DocumentDictionaryFactory",
  "field": "title_facet",
  "suggestAnalyzerFieldType": "string",
  "buildOnStartup": true
 }
}' http://localhost:8983/solr/jn_core/config


and corresponding handler


echo
echo "setting up suggest handler"
curl -X POST -H 'Content-type:application/json' --data-binary '{
 "update-requesthandler": {
  "name": "/suggest",
  "startup": "lazy",
  "class": "solr.SearchHandler",
  "defaults": {
   "suggest": true,
   "suggest.count": 10
  },
  "components": ["titleSuggester"]
 }
}' http://localhost:8983/solr/jn_core/config


it seems to be configured


http://localhost:8983/solr/jn_core/config/searchComponent?componentName=titleSuggester

{
  "responseHeader":{
"status":0,
"QTime":1},
  "config":{"searchComponent":{"titleSuggester":{
"class":"solr.SuggestComponent",
"name":"titleSuggester",
"lookupImpl":"FuzzyLookupFactory",
"dictionaryImpl":"DocumentDictionaryFactory",
"field":"title_facet",
"suggestAnalyzerFieldType":"string",
"buildOnStartup":true

but solr returns "No suggester named titleSuggester was configured"
http://localhost:8983/solr/jn_core/suggest?suggest=true=true=elec=titleSuggester

  "responseHeader":{

"status":400,
"QTime":0},
  "error":{
"metadata":[
  "error-class","org.apache.solr.common.SolrException",
  "root-error-class","org.apache.solr.common.SolrException"],
"msg":"No suggester named titleSuggester was configured",
"code":400}}