Re: Basic Query Not Working - Please Help

2019-07-22 Thread Furkan KAMACI
Hi Vipul,

Which query do you submit? Is that one:

q=appname:App1

Kind Regards,
Furkan KAMACI

On Mon, Jul 22, 2019 at 10:52 AM Vipul Bahuguna <
newthings4learn...@gmail.com> wrote:

> Hi,
>
> I have installed SOLR 8.1.1.
> I am new and trying the very basics.
>
> I installed solr8.1.1 on Windows and I am using SOLR in standalone mode.
>
> Steps I followed -
>
> 1. created a core as follows:
> solr create_core -c dox
>
> 2. updated the managed_schema.xml file to add few specific fields specific
> to my schema as belows:
>
> 
> 
> 
>  stored="true"/>
>
> 3. then i restarted SOLR
>
> 4. then i went to the Documents tab to enter my sample data for indexing,
> which looks like below:
> {
>
>   "id" : "1",
>   "prjname" : "Project1",
>   "apps" : [
> {
>   "appname" : "App1",
>   "topics" : [
> {
>   "topicname" : "topic1",
>   "links" : [
> "http://www.google.com;,
> "http://www.t6.com;
>   ]
> },
> {
>   "topicname" : "topic2",
>   "links" : [
> "http://www.java.com;,
> "http://www.rediff.com;
>   ]
> }
>   ]
> },
> {
>   "appname" : "App2",
>   "topics" : [
> {
>   "topicname" : "topic3",
>   "links" : [
> "http://www.t3.com;,
> "http://www.t4.com;
>   ]
> },
> {
>   "topicname" : "topic4",
>   "links" : [
> "http://www.rules.com;,
> "http://www.amazon.com;
>   ]
> }
>   ]
> }
>   ]
> }
>
> 5. Now when i go to Query tab and click Execute Search with *.*, it shows
> my recently added document as follows:
> {
> "responseHeader":{ "status":0, "QTime":0, "params":{ "q":"*:*", "_":
> "1563780352100"}}, "response":{"numFound":1,"start":0,"docs":[ { "id":"1",
> "
> prjname":["Project1"], "apps":["{appname=App1, topics=[{topicname=topic1,
> links=[http://www.google.com, http://www.t6.com]}, {topicname=topic2,
> links=[http://www.java.com, http://www.rediff.com]}]};, "{appname=App2,
> topics=[{topicname=topic3, links=[http://www.t3.com, http://www.t4.com]},
> {topicname=topic4, links=[http://www.rules.com, http://www.amazon.com
> ]}]}"],
> "_version_":1639742305772503040}] }}
>
> 6. But now when I am trying to search based on field topicname or prjname,
> it does not returns any document. Even if put anything in q like App1, zero
> results are being returned.
>
>
> Can someone help me understanding what I might have done incorrectly?
> May be I defined my schema incorrectly.
>
> Thanks in advance
>


Re: Collection creation error in Solr 8.1.1 version

2019-07-22 Thread Shawn Heisey

On 7/22/2019 12:55 PM, Siva Tallapaneni wrote:

When I try to create a collection I'm running into issues, Following is the
exception I'm seeing





HTTP/2 + SSL is not support in Java 8.
Configure Solr with HTTP/1.1 + SSL


Those lines are telling you what's wrong.  Java 8 cannot do SSL 
connections with HTTP/2.  The client that is being used by the command 
you're running is one that does HTTP/2.


You have a few choices:

1) Upgrade to a later major Java version.  I would recommend Java 11.
2) Use HTTP/1.1 instead of HTTP/2.  Don't know if bin/solr in 8.1.1 can 
do this.

3) Disable SSL.
4) Do the collection creation manually:
 4a) upload the config to ZK
 4b) use the collections API to create, possibly with a browser.

Thanks,
Shawn


/get handler on simple collection alias only checking first collection in list

2019-07-22 Thread Richard Jones
On 8.1.1 and 7.7.2 I have a simple collection alias where /select is
working as expected, but /get is only checking the first underlying
collection for documents.

Is this expected behaviour?

My routing field is a string so I cannot use complex routing for
aliases. I wanted to see if it's a known bug or a known feature.

Steps to reproduce :

Create the collections :

$ /opt/solr/bin/solr create_collection -c first
...
Created collection 'first' with 1 shard(s), 1 replica(s) with config-set 'first'
$ /opt/solr/bin/solr create_collection -c second
...
Created collection 'second' with 1 shard(s), 1 replica(s) with
config-set 'second'

Create the alias :

$ curl 
'localhost:8983/solr/admin/collections?action=CREATEALIAS=simplealias=first,second'
{
  "responseHeader":{
"status":0,
"QTime":133}}

Insert the test documents :

$ curl -d '[{"id":"1","site":"first"}]'
'localhost:8983/solr/first/update?commit=true' -H
"content-type:application/json"
{
  "responseHeader":{
"rf":1,
"status":0,
"QTime":235}}
$ curl -d '[{"id":"2","site":"second"}]'
'localhost:8983/solr/second/update?commit=true' -H
"content-type:application/json"
{
  "responseHeader":{
"rf":1,
"status":0,
"QTime":163}}

Select from the alias :

$ curl 'localhost:8983/solr/simplealias/select/?q=*:*'
{
  "responseHeader":{
"zkConnected":true,
"status":0,
"QTime":58,
"params":{
  "q":"*:*"}},
  "response":{"numFound":2,"start":0,"maxScore":1.0,"docs":[
  {
"id":"1",
"site":["first"],
"_version_":1639785169851252736},
  {
"id":"2",
"site":["second"],
"_version_":1639785186243641344}]
  }}

Get from the first underlying collection :

$ curl 'localhost:8983/solr/simplealias/get?id=1'
{
  "doc":
  {
"id":"1",
"site":["first"],
"_version_":1639785169851252736}}

Get from the second underlying collection :

$ curl 'localhost:8983/solr/simplealias/get?id=2'
{
  "doc":null}

Specifying the shard of the second collection yields a result,
indicating this is a routing issue? :

$ curl 
'localhost:8983/solr/simplealias/get?id=2=all=http://10.1.0.128:8983/solr/second_shard1_replica_n1/'
{
  "doc":
  {
"id":"2",
"site":["second"],
"_version_":1639785186243641344}}


Thanks,
Rich


Collection creation error in Solr 8.1.1 version

2019-07-22 Thread Siva Tallapaneni
Hi,

I have Solr running in cloud mode in 3 VM's and I have three different VM's
running zookeeper in quorum. I enabled SSL and able to access Solr UI fine.
I was able to upload configs and see all configsets in UI cloud\tree

When I try to create a collection I'm running into issues, Following is the
exception I'm seeing

[solr@dcmidavsol0007 bin]$ ./solr create -c 142713_SDR -d
/home/WZS2RQ/solr_configs/142713_SDR -n 142713_SDR -s 2 -rf 2
HTTP/2 + SSL is not support in Java 8.
Configure Solr with HTTP/1.1 + SSL
INFO  - 2019-07-22 14:42:21.608;
org.apache.solr.util.configuration.SSLConfigurations; Setting
javax.net.ssl.keyStorePassword
INFO  - 2019-07-22 14:42:21.612;
org.apache.solr.util.configuration.SSLConfigurations; Setting
javax.net.ssl.trustStorePassword
Re-using existing configuration directory 142713_SDR

ERROR: Failed to create collection '142713_SDR' due to: Underlying core
creation failed while creating collection: 142713_SDR

[solr@dcmidavsol0007 bin]$


I'm seeing following exceptions in Solr.log as well though they are not
related. Appreciate if somebody can point me in the right direction getting
the collection creation issue sorted out.

2019-07-22 13:47:50.597 WARN  (MetricsHistoryHandler-12-thread-1) [   ]
o.a.s.c.s.i.SolrClientNodeStateProvider could not get tags from node
dcmidavsol0007:8983_solr
java.lang.NullPointerException: null
at
org.apache.solr.client.solrj.impl.SolrClientNodeStateProvider.lambda$fetchReplicaMetrics$7(SolrClientNodeStateProvider.java:226)
~[solr-solrj-8.1.1.jar:8.1.1 fcbe46c28cef11bc058779afba09521de1b19bef - ab
- 2019-05-22 15:20:04]
at java.util.HashMap.forEach(HashMap.java:1289) ~[?:1.8.0_212]
at
org.apache.solr.client.solrj.impl.SolrClientNodeStateProvider.fetchReplicaMetrics(SolrClientNodeStateProvider.java:225)
~[solr-solrj-8.1.1.jar:8.1.1 fcbe46c28cef11bc058779afba09521de1b19bef - ab
- 2019-05-22 15:20:04]
at
org.apache.solr.client.solrj.impl.SolrClientNodeStateProvider$AutoScalingSnitch.getRemoteInfo(SolrClientNodeStateProvider.java:271)
~[solr-solrj-8.1.1.jar:8.1.1 fcbe46c28cef11bc058779afba09521de1b19bef - ab
- 2019-05-22 15:20:04]
at
org.apache.solr.common.cloud.rule.ImplicitSnitch.getTags(ImplicitSnitch.java:76)
~[solr-solrj-8.1.1.jar:8.1.1 fcbe46c28cef11bc058779afba09521de1b19bef - ab
- 2019-05-22 15:20:04]
at
org.apache.solr.client.solrj.impl.SolrClientNodeStateProvider.fetchTagValues(SolrClientNodeStateProvider.java:139)
~[solr-solrj-8.1.1.jar:8.1.1 fcbe46c28cef11bc058779afba09521de1b19bef - ab
- 2019-05-22 15:20:04]
at
org.apache.solr.client.solrj.impl.SolrClientNodeStateProvider.getNodeValues(SolrClientNodeStateProvider.java:128)
~[solr-solrj-8.1.1.jar:8.1.1 fcbe46c28cef11bc058779afba09521de1b19bef - ab
- 2019-05-22 15:20:04]
at
org.apache.solr.handler.admin.MetricsHistoryHandler.collectGlobalMetrics(MetricsHistoryHandler.java:506)
~[solr-core-8.1.1.jar:8.1.1 fcbe46c28cef11bc058779afba09521de1b19bef - ab -
2019-05-22 15:20:01]
at
org.apache.solr.handler.admin.MetricsHistoryHandler.collectMetrics(MetricsHistoryHandler.java:378)
~[solr-core-8.1.1.jar:8.1.1 fcbe46c28cef11bc058779afba09521de1b19bef - ab -
2019-05-22 15:20:01]
at
org.apache.solr.handler.admin.MetricsHistoryHandler.lambda$new$0(MetricsHistoryHandler.java:235)
~[solr-core-8.1.1.jar:8.1.1 fcbe46c28cef11bc058779afba09521de1b19bef - ab -
2019-05-22 15:20:01]
at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
[?:1.8.0_212]
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
[?:1.8.0_212]
at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
[?:1.8.0_212]
at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
[?:1.8.0_212]
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[?:1.8.0_212]
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[?:1.8.0_212]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_212]


Solr join query

2019-07-22 Thread Rajdeep Sahoo
Can we join two solr collection based on multivalued field.


auto complete search - slow response

2019-07-22 Thread Satya Marivada
Hi All,

We have solr 6.3.0 solr cloud running stable. We use an auto complete
search functionality where the search is being done after 3 key strokes.
Recently we ran into an issue (very slow response from solr) when one of
the user hit an auto complete search by typing initial letters of week days
and in repetitions.

Something like "S M T W T F S S M T W T F S .."

Is there a recommended approach from solr perspective to prevent such
scenarios? Thinking of preventing any searches with more than 4 or 5 single
letter searches as that would not be the use case for us.

Looking for any recommendations?

Thanks,
Satya


Returning multiple fields in /graph streaming expression response

2019-07-22 Thread Ahmed Adel
Hi,

Similar to this question (
https://mail-archives.apache.org/mod_mbox/lucene-solr-user/201907.mbox/browser),
how can additional fields be returned when using /graph request handler?

For example, from the documentation, for the request:

nodes(enron_emails,
nodes(enron_emails,
walk="kayne.coul...@enron.com->from",
  trackTraversal="true",
gather="to"),  walk="node->from",
scatter="leaves,branches",
 trackTraversal="true",
  gather="to")


is there a way to add more fields to the response:

http://graphml.graphdrawing.org/xmlns"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:schemaLocation="http://graphml.graphdrawing.org/xmlns
http://graphml.graphdrawing.org/xmlns/1.0/graphml.xsd;>
 
   node
   0
   0.0
 
 
   to
   1
   1.0
 
 
 
   to
   1
   1.0



  to
  1
  1.0




Best,
A. Adel
http://aadel.io


Re: solr.OpenExchangeRatesOrgProvider and way to much requests1, Solr 5.5.5

2019-07-22 Thread Jan Høydahl
Can you please paste some Solr log lines showing the refresh decisions?
PS: You may want to increase log level to DEBUG for 
OpenExchangeRatesOrgProvider class (from logs->level in UI)

--
Jan Høydahl, search solution architect
Cominvent AS - www.cominvent.com

> 22. jul. 2019 kl. 10:59 skrev Werner Detter :
> 
> Hi, 
> 
> I've got a SolrCloud Instance running and implemented currency field via 
> OpenEchangeRatesOrtProvider
> and wondered why we've reached the limit as refreshInterval has been set to 
> 60. 
> 
> For the sake of testings I've downloaded the currency-file to a local 
> webserver and discovered, updated
> the schema.xml to reflect the URL with the JSON file on the webserver like 
> follows:
> 
>providerClass="solr.OpenExchangeRatesOrgProvider"
>   refreshInterval="60"
>   ratesFileLocation="http://192.168.1.23/currencies.json; 
> multiValued="false"/>
> 
> Checking through the logs from the Webserver shows that Solr calls 
> currencies.json like 5 Million times!
> since this log rotation this morning around 06:00 am. 
> 
> So the question is: are there known bugs in Solr 5.5.5, especially in 
> SolrCloud with two Solr nodes and 
> solr.OpenExchangeRatesOrgProvider? I thought by setting refreshInterval="60" 
> Solr should only query or
> update it's currencies every 60 minutes? Instead it looks like every query 
> generates a call to the 
> OXR provider? Any hints on this? 
> 
> Thanks,
> Werner
> 
> 
> 



Re: HowtoConfigureIntelliJ link is broken

2019-07-22 Thread Jason Gerlowski
Hi Richard,

Thanks for the heads up.  I think this was a known issue.  We recently
moved our wiki from a Moin wiki to a Confluence one, and this changed
the urls.  There was an issue with the redirects at first, but they
appear to be working now.  Glad you were able to find what you needed
regardless.  The url you posted works for me now.  You can also use
the new url: 
https://cwiki.apache.org/confluence/display/lucene/HowtoConfigureIntelliJ

Best,

Jason

On Thu, Jul 18, 2019 at 12:12 PM Richard Goodman
 wrote:
>
> Hi there,
>
> I went to set up the repo with intellij, but it was having some problems
> figuring out the source folders etc., So I went to navigate to the
> following link 
> as I remember from the past there were a few commands that helped, however,
> it appears to be broken? I used a website archiver to retrieve the original
> contents, but wasn't sure if it had been raised.
>
> Thanks,
>
> --
>
> Richard Goodman|Data Infrastructure engineer
>
> richa...@brandwatch.com
>
>
> NEW YORK   | BOSTON   | BRIGHTON   | LONDON   | BERLIN |   STUTTGART |
> PARIS   | SINGAPORE | SYDNEY
>
> 


solr.OpenExchangeRatesOrgProvider and way to much requests1, Solr 5.5.5

2019-07-22 Thread Werner Detter
Hi, 

I've got a SolrCloud Instance running and implemented currency field via 
OpenEchangeRatesOrtProvider
and wondered why we've reached the limit as refreshInterval has been set to 60. 

For the sake of testings I've downloaded the currency-file to a local webserver 
and discovered, updated
the schema.xml to reflect the URL with the JSON file on the webserver like 
follows:

 http://192.168.1.23/currencies.json; 
multiValued="false"/>

Checking through the logs from the Webserver shows that Solr calls 
currencies.json like 5 Million times!
since this log rotation this morning around 06:00 am. 

So the question is: are there known bugs in Solr 5.5.5, especially in SolrCloud 
with two Solr nodes and 
solr.OpenExchangeRatesOrgProvider? I thought by setting refreshInterval="60" 
Solr should only query or
update it's currencies every 60 minutes? Instead it looks like every query 
generates a call to the 
OXR provider? Any hints on this? 

Thanks,
Werner





Re: Problems using a suggester component in the /select handler in cloud mode

2019-07-22 Thread Jason Gerlowski
Hi Alexandros,

The first step would be to package up your changes in a patch file, and
upload that to the JIRA you linked to in your initial email. (SOLR-12060).
More detailed instructions can be found here:
https://cwiki.apache.org/confluence/display/solr/HowToContribute#HowToContribute-Generatingapatch.
If you prefer, you can also create a PR on github with your changes, and
put a link to the PR on the JIRA ticket.  (There are many guides out there
on creating Github PRs, so I won't get into that.)

Thanks for putting in the effort to share your work.  Good luck!

Best,

Jason

On Tue, Jul 16, 2019 at 8:50 AM Alexandros Paramythis <
alexandros.paramyt...@contexity.ch> wrote:

> Hi everyone,
>
> We have a fix for the problem described in the message below. Could anyone
> provide pointers to documentation on how we would go about contributing
> this back?
>
> Thanks in advance for your input,
>
> Alex
>
>
> On 26/06/2019 10:48, Alexandros Paramythis wrote:
>
> Hi everyone,
>
> Environment:
>
> Solr 7.5.0, cloud mode (but problem should be identical in multiple
> versions, at least in 7.x)
>
> Summary:
>
> We have a Solr configuration that returns suggestions in the course of a
> normal search call (i.e., we have a 'suggest' component added to the
> 'last-components' for '/select' request handler). This does not work in
> cloud mode, where we get an NPE in QueryComponent. This problem seems to
> have been reported in various forms in the past -- see for example [1] and
> [2] (links at the end of this email) -- but we couldn't find any resolution
> (or in-depth discussion for that matter).
>
> In more detail:
>
> We have a suggest component configured as follows:
>
>   
>
> 
> default
>  name="classname">org.apache.solr.spelling.suggest.Suggester
>  name="lookupImpl">org.apache.solr.spelling.suggest.fst.AnalyzingLookupFactory
> dict_default
> text_suggest
> text_suggest
> true
> true
> true
> 
>
> 
> suggest_phrase
>  name="lookupImpl">org.apache.solr.spelling.suggest.fst.AnalyzingLookupFactory
> dict_suggest_phrase
>  name="suggestAnalyzerFieldType">text_suggest_phrase
> suggest_phrase
> true
> true
> true
> 
>
> 
> suggest_infix_shingle
> AnalyzingInfixLookupFactory
> suggestInfixShingleDir
>  name="suggestAnalyzerFieldType">text_suggest_phrase
> suggest_phrase
> true
> true
> true
> 
>
> 
> suggest_prefix
> Suggester
> AnalyzingLookupFactory
>  name="suggestAnalyzerFieldType">text_suggest_prefix
> suggest_prefix
> true
> true
> true
> 
>
>   
>
>
> This component works without issued both in standalone and cloud mode,
> when used as the sole component in a handler, such as in the following
> excerpt:
>
>  startup="lazy">
> 
> default
> suggest_phrase
>  name="suggest.dictionary">suggest_infix_shingle
> suggest_prefix
> true
> 10
> false
> 
> 
> suggest
> 
> 
>
>
> It also works when used along with other component in standalone mode,
> such as in the following excerpt, where we use the suggest component to get
> suggestions during a "normal" search call:
>
> 
> 
> explicit
> 10
> text_search
>
> edismax
>
> title^5.0 subtitle^3.0 abstract^2.0
> text_search
> title^5.0 subtitle^3.0 abstract^2.0
> text_search
> 4
> on
> default
> true
> 10
>  name="spellcheck.alternativeTermCount">5
>  name="spellcheck.maxResultsForSuggest">5
> true
>  name="spellcheck.collateExtendedResults">true
> 10
> 5
>
> default
>  name="suggest.dictionary">suggest_phrase
>  name="suggest.dictionary">suggest_infix_shingle
>  name="suggest.dictionary">suggest_prefix
> true
> 10
> false
> 
>
> 

Basic Query Not Working - Please Help

2019-07-22 Thread Vipul Bahuguna
Hi,

I have installed SOLR 8.1.1.
I am new and trying the very basics.

I installed solr8.1.1 on Windows and I am using SOLR in standalone mode.

Steps I followed -

1. created a core as follows:
solr create_core -c dox

2. updated the managed_schema.xml file to add few specific fields specific
to my schema as belows:






3. then i restarted SOLR

4. then i went to the Documents tab to enter my sample data for indexing,
which looks like below:
{

  "id" : "1",
  "prjname" : "Project1",
  "apps" : [
{
  "appname" : "App1",
  "topics" : [
{
  "topicname" : "topic1",
  "links" : [
"http://www.google.com;,
"http://www.t6.com;
  ]
},
{
  "topicname" : "topic2",
  "links" : [
"http://www.java.com;,
"http://www.rediff.com;
  ]
}
  ]
},
{
  "appname" : "App2",
  "topics" : [
{
  "topicname" : "topic3",
  "links" : [
"http://www.t3.com;,
"http://www.t4.com;
  ]
},
{
  "topicname" : "topic4",
  "links" : [
"http://www.rules.com;,
"http://www.amazon.com;
  ]
}
  ]
}
  ]
}

5. Now when i go to Query tab and click Execute Search with *.*, it shows
my recently added document as follows:
{
"responseHeader":{ "status":0, "QTime":0, "params":{ "q":"*:*", "_":
"1563780352100"}}, "response":{"numFound":1,"start":0,"docs":[ { "id":"1", "
prjname":["Project1"], "apps":["{appname=App1, topics=[{topicname=topic1,
links=[http://www.google.com, http://www.t6.com]}, {topicname=topic2,
links=[http://www.java.com, http://www.rediff.com]}]};, "{appname=App2,
topics=[{topicname=topic3, links=[http://www.t3.com, http://www.t4.com]},
{topicname=topic4, links=[http://www.rules.com, http://www.amazon.com]}]};],
"_version_":1639742305772503040}] }}

6. But now when I am trying to search based on field topicname or prjname,
it does not returns any document. Even if put anything in q like App1, zero
results are being returned.


Can someone help me understanding what I might have done incorrectly?
May be I defined my schema incorrectly.

Thanks in advance