Re: Partial update error for missing _root_ after updating to Solr 8.8.2

2021-06-09 Thread Andreas Hubold
The error seems to happens for every kind of partial update / atomic update
when the _root_ field was added to the schema of an existing index.

This means, Solr 8.8.2 now requires a full reindex when one adds the _root_
field to the schema of an existing index. Previously (Solr 8.6.3) this
wasn't required, and I also don't understand why this would be needed?

Would you agree, that this is a bug? 



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


Re: issue in solr

2021-06-09 Thread Alessandro Benedetti
The log is your friend here :)
I strongly recommend to take a look there:

- an unsupported boolean query (sd)
- an undefined field
- some missing file in the config

Probably there's much more in the logs.

Explore it, identify all the problems, understand them by researching
documentation/source code then validate your hypotheses and fixes with
reproducible experiments.
Good luck!
Cheers
--
Alessandro Benedetti
Apache Lucene/Solr Committer
Director, R&D Software Engineer, Search Consultant

www.sease.io


On Tue, 8 Jun 2021 at 09:27, Aman Tandon  wrote:

> Hi Astha,
>
> I am seeing invalid boolean query in solr ui logs screenshot. Could you
> please share the query you are using to check the records.
>
> On Tue, 8 Jun 2021, 13:40 CHOUDHARY Astha, <
> astha.choudh...@soprasteria.com>
> wrote:
>
> > Hello Team,
> >
> >
> >
> > We are experincing issue in the solr
> >
> >
> >
> > We have 2 servers for solr application and there are 3 solr docker
> > container deployed in the server.
> >
> >
> >
> > Issue 1-Solr is getting down ver frequently
> >
> > Issue 2 unable to search anything
> >
> >
> >
> > While making all the solr up , still solr search is KO
> >
> >
> >
> > All the shards are in green state and still search is not working
> >
> >
> >
> > I am sharing one doc with all the relevant screenshot. Please assist us.
> >
> >
> >
> > Regards
> >
> > Astha
> >
> >
> >
> >
> >
> >
> >
> > C2 - Restricted
> >
>


Re: Help with SOLR and Liferay

2021-06-09 Thread Alessandro Benedetti
It seems Liferay uses Apache Solr to look for users, that query is
incorrect though :

*+((+entryClassName:com.liferay.portal.kernel.model.User +status:5)) *->
this clause is valid, redundant mandatory wrapping clause, but it should
work fine and it means results must contain  "5 in status", and
"com.liferay.portal.kernel.model.User in entryClassName

 +(companyId:20116) -> another valid clause, mandatory "20116 in companyId"

+(+()) -> as far as I know (and the column number 74 points in this
direction), this empty clause causes the exception, that's clearly a bug of
the query builder that generated that query string and send it to Apache
Solr through the Lucene Query Parser, this doesn't mean anything in the
Lucene Query Language.
>From the log the LuceneQueryParser is used.
(I may be wrong, sometimes we see a toString of the query in the logs,
which may be slightly different from what the user passed, but probably the
client supplied that exact query)


Cheers
--
Alessandro Benedetti
Apache Lucene/Solr Committer
Director, R&D Software Engineer, Search Consultant

www.sease.io


On Tue, 8 Jun 2021 at 21:29, Félix Martín Celaya Murguía <
felix.cel...@corprama.com.mx> wrote:

> Hello everybody,
> I wish you could guide me to solve a problem in my environment that
> consists of the following components:
>
> - CMS: Liferay DXP 7.0
> - SOLR: 6.2.1
>
> Solr is the indexer, however, in the liferay control panel I cannot see
> the users and organization and therefore I cannot assign permissions and
> roles either.
>
> Reviewing the liferay logs I see the following message:
>
> org.apache.solr.common.SolrException: org.apache.solr.search.SyntaxError:
> Cannot parse '+(+((+entryClassName:com.liferay.portal.kernel.model.User
> +status:5)) +(+())) +(companyId:20116)': Encountered " ")" ") "" at line 1,
> column 74.
> Was expecting one of:
>  ...
> "+" ...
> "-" ...
>  ...
> "(" ...
> "*" ...
>  ...
>  ...
>  ...
>  ...
>  ...
> "[" ...
> "{" ...
>  ...
> "filter(" ...
>  ...
>  ...
> "*" ...
>
>   at
> org.apache.solr.handler.component.QueryComponent.prepare(QueryComponent.java:218)
>   at
> org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:269)
>   at
> org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:154)
>   at org.apache.solr.core.SolrCore.execute(SolrCore.java:2089)
>   at
> org.apache.solr.servlet.HttpSolrCall.execute(HttpSolrCall.java:652)
>   at org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:459)
>   at
> org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:257)
>   at
> org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:208)
>   at
> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1668)
>   at
> org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:581)
>   at
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
>   at
> org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548)
>   at
> org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226)
>   at
> org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1160)
>   at
> org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:511)
>   at
> org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
>   at
> org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1092)
>   at
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
>   at
> org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:213)
>   at
> org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:119)
>   at
> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134)
>   at org.eclipse.jetty.server.Server.handle(Server.java:518)
>   at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:308)
>   at
> org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:244)
>   at org.eclipse.jetty.io
> .AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:273)
>   at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:95)
>   at org.eclipse.jetty.io
> .SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:93)
>   at
> org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceAndRun(ExecuteProduceConsume.java:246)
>   at
> org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:156)
>   at
> org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:654)
>   at
> org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:572)
>   at java

[Solr][Issue] Cannot highlight field with whitespace

2021-06-09 Thread Benjamin COVEN
Hello !

I am sending this email before opening a Jira issue because I have an issue 
with Solr:

I would like to do highlighting on fields that contain whitespaces. I tried to 
send the field name between quotes or escape the whitespace without success, I 
always receive 400 error telling me the first word of the field name is not a 
defined field. I also tried to use '*' and I get the same error 400 telling me 
that the first word of one of my field (the first one of my query) is not 
defined.

I use Solr cloud 8.7.0

Thank you very much for your help!

Sincerely,
Benjamin Coven


Re: [Solr][Issue] Cannot highlight field with whitespace

2021-06-09 Thread Jan Høydahl
Space in field names is a very bad idea. Please stick to only normal characters 
and "." or "-" or "_" as delimiters to be on the safe side.

Jan

> 9. jun. 2021 kl. 13:59 skrev Benjamin COVEN :
> 
> Hello !
> 
> I am sending this email before opening a Jira issue because I have an issue 
> with Solr:
> 
> I would like to do highlighting on fields that contain whitespaces. I tried 
> to send the field name between quotes or escape the whitespace without 
> success, I always receive 400 error telling me the first word of the field 
> name is not a defined field. I also tried to use '*' and I get the same error 
> 400 telling me that the first word of one of my field (the first one of my 
> query) is not defined.
> 
> I use Solr cloud 8.7.0
> 
> Thank you very much for your help!
> 
> Sincerely,
> Benjamin Coven



Sorting is working in primitive multivalued fields without docValues

2021-06-09 Thread Mónica Marrero
Hi,

I am using Solr 7.7 in Cloud, and I had understood from the
documentation that sorting is not possible in multivalued fields when
docValues is not activated. To my surprise I am able to directly sort (e.g.
sort=CREATOR asc) using the two fields below (I also copy the definition of
the field types):





Am I missing something? The schema version is still 0.8 in case that makes
any difference.

Thanks in advance for your help.

-- 
Disclaimer: This email and any files transmitted with it are confidential 
and intended solely for the use of the individual or entity to whom they 
are
addressed. If you have received this email in error please notify the 
system manager. If you are not the named addressee you should not 
disseminate,
distribute or copy this email. Please notify the sender 
immediately by email if you have received this email by mistake and delete 
this email from your
system.


Re: Sorting is working in primitive multivalued fields without docValues

2021-06-09 Thread Alexandre Rafalovitch
I am pretty sure your reality is correct and your document reading (or
document itself) is less than perfect. docValues are strongly
recommended if you are going to do a lot of sorting. But the ability
to sort existed before docValues were created.

Can you send the specific (version-specific ideally) link and quote
that confuses you?

Regards,
   Alex.

On Wed, 9 Jun 2021 at 11:02, Mónica Marrero  wrote:
>
> Hi,
>
> I am using Solr 7.7 in Cloud, and I had understood from the
> documentation that sorting is not possible in multivalued fields when
> docValues is not activated. To my surprise I am able to directly sort (e.g.
> sort=CREATOR asc) using the two fields below (I also copy the definition of
> the field types):
>
>  positionIncrementGap="0"/> sortMissingLast="true" omitNorms="true"/>
>  ="true"/>
>  multiValued="true"/>
>
> Am I missing something? The schema version is still 0.8 in case that makes
> any difference.
>
> Thanks in advance for your help.
>
> --
> Disclaimer: This email and any files transmitted with it are confidential
> and intended solely for the use of the individual or entity to whom they
> are
> addressed. If you have received this email in error please notify the
> system manager. If you are not the named addressee you should not
> disseminate,
> distribute or copy this email. Please notify the sender
> immediately by email if you have received this email by mistake and delete
> this email from your
> system.


Invalid query error when using rq param with a shards query

2021-06-09 Thread gnandre
Hi,

I am using Solr 8.5.2 with the LTR feature enabled. I have successfully
uploaded a trained model to Solr. When I add rq={!ltr model=model
efi.query=$q reRankDocs=100} param to my regular search query, it works.
But when I pass a shards param with a list of shards then I run into the
following error. Any ideas why this might be the case?

solr_1   | 2021-06-09 16:45:41.126 ERROR
(qtp128359175-19) [   x:add-ons] o.a.s.h.RequestHandlerBase
org.apache.solr.client.solrj.impl.BaseHttpSolrClient$RemoteSolrException:
Error from server at null: invalid query parser 'ltr' for query '{!ltr
model=model efi.query=$q reRankDocs=100}'
solr_1   |  at
org.apache.solr.client.solrj.impl.Http2SolrClient.processErrorsAndResponse(Http2SolrClient.java:734)
solr_1   |  at
org.apache.solr.client.solrj.impl.Http2SolrClient.request(Http2SolrClient.java:401)
solr_1   |  at
org.apache.solr.client.solrj.impl.Http2SolrClient.request(Http2SolrClient.java:753)
solr_1   |  at
org.apache.solr.client.solrj.SolrClient.request(SolrClient.java:1290)
solr_1   |  at
org.apache.solr.handler.component.HttpShardHandler.request(HttpShardHandler.java:208)
solr_1   |  at
org.apache.solr.handler.component.HttpShardHandler.lambda$submit$0(HttpShardHandler.java:170)
solr_1   |  at
java.util.concurrent.FutureTask.run(FutureTask.java:266)
solr_1   |  at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
solr_1   |  at
java.util.concurrent.FutureTask.run(FutureTask.java:266)
solr_1   |  at
com.codahale.metrics.InstrumentedExecutorService$InstrumentedRunnable.run(InstrumentedExecutorService.java:180)
solr_1   |  at
org.apache.solr.common.util.ExecutorUtil$MDCAwareThreadPoolExecutor.lambda$execute$0(ExecutorUtil.java:210)
solr_1   |  at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
solr_1   |  at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
solr_1   |  at
java.lang.Thread.run(Thread.java:748)


Re: Sorting is working in primitive multivalued fields without docValues

2021-06-09 Thread Alessandro Benedetti
>From the wiki:

The value of any primitive field (numerics, string, boolean, dates, etc.)
> which has docValues="true" (or multiValued="false" and indexed="true", in
> which case the indexed terms will used to build DocValue like structures on
> the fly at runtime)


I think the documentation is incorrect.

Taking a look to the code:
org.apache.solr.schema.PrimitiveFieldType#getDefaultMultiValueSelectorForSort

https://issues.apache.org/jira/browse/SOLR-11854
https://github.com/apache/lucene-solr/commit/e2bba98/


I t seems the
documentation was correct, at the time of the original Jira?
Maybe a regression happened.
Will spend some more time tomorrow

--
Alessandro Benedetti
Apache Lucene/Solr Committer
Director, R&D Software Engineer, Search Consultant

www.sease.io


On Wed, 9 Jun 2021 at 17:04, Alexandre Rafalovitch 
wrote:

> I am pretty sure your reality is correct and your document reading (or
> document itself) is less than perfect. docValues are strongly
> recommended if you are going to do a lot of sorting. But the ability
> to sort existed before docValues were created.
>
> Can you send the specific (version-specific ideally) link and quote
> that confuses you?
>
> Regards,
>Alex.
>
> On Wed, 9 Jun 2021 at 11:02, Mónica Marrero 
> wrote:
> >
> > Hi,
> >
> > I am using Solr 7.7 in Cloud, and I had understood from the
> > documentation that sorting is not possible in multivalued fields when
> > docValues is not activated. To my surprise I am able to directly sort
> (e.g.
> > sort=CREATOR asc) using the two fields below (I also copy the definition
> of
> > the field types):
> >
> >  > positionIncrementGap="0"/> > sortMissingLast="true" omitNorms="true"/>
> >  multiValued
> > ="true"/>
> >  > multiValued="true"/>
> >
> > Am I missing something? The schema version is still 0.8 in case that
> makes
> > any difference.
> >
> > Thanks in advance for your help.
> >
> > --
> > Disclaimer: This email and any files transmitted with it are confidential
> > and intended solely for the use of the individual or entity to whom they
> > are
> > addressed. If you have received this email in error please notify the
> > system manager. If you are not the named addressee you should not
> > disseminate,
> > distribute or copy this email. Please notify the sender
> > immediately by email if you have received this email by mistake and
> delete
> > this email from your
> > system.
>


Re: Invalid query error when using rq param with a shards query

2021-06-09 Thread gnandre
Please ignore, this was an issue with the incorrect values I was passing to
shards param.

On Wed, Jun 9, 2021 at 12:52 PM gnandre  wrote:

> Hi,
>
> I am using Solr 8.5.2 with the LTR feature enabled. I have successfully
> uploaded a trained model to Solr. When I add rq={!ltr model=model
> efi.query=$q reRankDocs=100} param to my regular search query, it works.
> But when I pass a shards param with a list of shards then I run into the
> following error. Any ideas why this might be the case?
>
> solr_1   | 2021-06-09 16:45:41.126 ERROR
> (qtp128359175-19) [   x:add-ons] o.a.s.h.RequestHandlerBase
> org.apache.solr.client.solrj.impl.BaseHttpSolrClient$RemoteSolrException:
> Error from server at null: invalid query parser 'ltr' for query '{!ltr
> model=model efi.query=$q reRankDocs=100}'
> solr_1   |  at
> org.apache.solr.client.solrj.impl.Http2SolrClient.processErrorsAndResponse(Http2SolrClient.java:734)
> solr_1   |  at
> org.apache.solr.client.solrj.impl.Http2SolrClient.request(Http2SolrClient.java:401)
> solr_1   |  at
> org.apache.solr.client.solrj.impl.Http2SolrClient.request(Http2SolrClient.java:753)
> solr_1   |  at
> org.apache.solr.client.solrj.SolrClient.request(SolrClient.java:1290)
> solr_1   |  at
> org.apache.solr.handler.component.HttpShardHandler.request(HttpShardHandler.java:208)
> solr_1   |  at
> org.apache.solr.handler.component.HttpShardHandler.lambda$submit$0(HttpShardHandler.java:170)
> solr_1   |  at
> java.util.concurrent.FutureTask.run(FutureTask.java:266)
> solr_1   |  at
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
> solr_1   |  at
> java.util.concurrent.FutureTask.run(FutureTask.java:266)
> solr_1   |  at
> com.codahale.metrics.InstrumentedExecutorService$InstrumentedRunnable.run(InstrumentedExecutorService.java:180)
> solr_1   |  at
> org.apache.solr.common.util.ExecutorUtil$MDCAwareThreadPoolExecutor.lambda$execute$0(ExecutorUtil.java:210)
> solr_1   |  at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
> solr_1   |  at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
> solr_1   |  at
> java.lang.Thread.run(Thread.java:748)
>