Re: Solr 6.6.2 ManagedSchema Replication

2018-08-17 Thread Shawn Heisey

On 8/17/2018 9:15 PM, Kelly Rusk wrote:

Hello all,

I am running Solr 6.6.2 in a Master/Slave setup. I need the managedschema file 
on the Master to replicate to the Slave servers. Does it:

- Get replicated automatically with the other files

OR
- Do I need to include this file to be replicated, and if so, how do I do this 
as managedschema doesn’t have a file extension to reference


If putting "managed-schema" (without the quotes) as a confFile to 
replicate doesn't copy it when the index changes and the schema changes, 
then I would call that a bug.


Looks like you asked this same question back in May and were told the 
same thing then, and given a possible workaround.


Thanks,
Shawn



Re: Copyto with DIH Interpreting string as MultiValued field on copy

2018-08-17 Thread Shawn Heisey

On 8/17/2018 6:15 PM, Zimmermann, Thomas wrote:

I’m trying to track down an odd issue I’m seeing when using the 
SolrEntityProcessor to seed some test data from a solr 4.x cluster to a solr 
7.x cluster. It seems like strings are being interpreted as multivalued when 
passed from a string field to a text field via the copyTo directive. Any clever 
ideas how to resolve this?


What's happening is deceptively simple.

In the source system, you're copying from author to authorText.  Both 
fields are stored.  So if you have "Jeff Hartley" in author, you also 
have "Jeff Hartley" in authorText. So what's happening is that when the 
destination system imports from the source system, it gets "Jeff 
Hartley" in both fields, and then copyField says "put a copy of what's 
in author into authorText" ... and suddenly there are two copies of 
"Jeff Hartley" in authorText.


There are two ways to deal with this:

1) In the query you're doing with SolrEntityProcessor, add an "fl" 
parameter and list all the fields *except* authorText and any other 
field where this same problem is happening.


2) Remove the copyField from the schema until after the import from the 
source server is done.


Thanks,
Shawn



Solr 6.6.2 ManagedSchema Replication

2018-08-17 Thread Kelly Rusk
Hello all,

I am running Solr 6.6.2 in a Master/Slave setup. I need the managedschema file 
on the Master to replicate to the Slave servers. Does it:

- Get replicated automatically with the other files

OR
- Do I need to include this file to be replicated, and if so, how do I do this 
as managedschema doesn’t have a file extension to reference

OR

- something else entirely to meet my goal

Thank you,

Kelly


Copyto with DIH Interpreting string as MultiValued field on copy

2018-08-17 Thread Zimmermann, Thomas
Hi,

I’m trying to track down an odd issue I’m seeing when using the 
SolrEntityProcessor to seed some test data from a solr 4.x cluster to a solr 
7.x cluster. It seems like strings are being interpreted as multivalued when 
passed from a string field to a text field via the copyTo directive. Any clever 
ideas how to resolve this?

Schema:


Fields and CopyTo








Text fieldtype declaration:








































DIH Config:





http://cluster.solr.eng.techtarget.com/solr/vignette "

query="*:*"

fl="*,orig_version_l:_version_">



















Error:


org.apache.solr.common.SolrException: ERROR: 
[doc=d751e434c69b6210VgnVCM100d01c80aRCRD] Error adding field 
'author'='Jeff Hartley' msg=Multiple values encountered for non multiValued 
copy field authorText: Jeff Hartley

at org.apache.solr.update.DocumentBuilder.toDocument(DocumentBuilder.java:203) 
~[solr-core-7.4.0.jar:7.4.0 9060ac689c270b02143f375de0348b7f626adebc - jpountz 
- 2018-06-18 16:55:13]

at 
org.apache.solr.update.AddUpdateCommand.getLuceneDocument(AddUpdateCommand.java:101)
 ~[solr-core-7.4.0.jar:7.4.0 9060ac689c270b02143f375de0348b7f626adebc - jpountz 
- 2018-06-18 16:55:13]

at 
org.apache.solr.update.DirectUpdateHandler2.updateDocument(DirectUpdateHandler2.java:980)
 ~[solr-core-7.4.0.jar:7.4.0 9060ac689c270b02143f375de0348b7f626adebc - jpountz 
- 2018-06-18 16:55:13]

at 
org.apache.solr.update.DirectUpdateHandler2.updateDocOrDocValues(DirectUpdateHandler2.java:971)
 ~[solr-core-7.4.0.jar:7.4.0 9060ac689c270b02143f375de0348b7f626adebc - jpountz 
- 2018-06-18 16:55:13]

at 
org.apache.solr.update.DirectUpdateHandler2.doNormalUpdate(DirectUpdateHandler2.java:348)
 ~[solr-core-7.4.0.jar:7.4.0 9060ac689c270b02143f375de0348b7f626adebc - jpountz 
- 2018-06-18 16:55:13]

at 
org.apache.solr.update.DirectUpdateHandler2.addDoc0(DirectUpdateHandler2.java:284)
 ~[solr-core-7.4.0.jar:7.4.0 9060ac689c270b02143f375de0348b7f626adebc - jpountz 
- 2018-06-18 16:55:13]

at 
org.apache.solr.update.DirectUpdateHandler2.addDoc(DirectUpdateHandler2.java:234)
 ~[solr-core-7.4.0.jar:7.4.0 9060ac689c270b02143f375de0348b7f626adebc - jpountz 
- 2018-06-18 16:55:13]

at 
org.apache.solr.update.processor.RunUpdateProcessor.processAdd(RunUpdateProcessorFactory.java:67)
 ~[solr-core-7.4.0.jar:7.4.0 9060ac689c270b02143f375de0348b7f626adebc - jpountz 
- 2018-06-18 16:55:13]

at 
org.apache.solr.update.processor.UpdateRequestProcessor.processAdd(UpdateRequestProcessor.java:55)
 ~[solr-core-7.4.0.jar:7.4.0 9060ac689c270b02143f375de0348b7f626adebc - jpountz 
- 2018-06-18 16:55:13]

at 
org.apache.solr.update.processor.DistributedUpdateProcessor.doLocalAdd(DistributedUpdateProcessor.java:950)
 ~[solr-core-7.4.0.jar:7.4.0 9060ac689c270b02143f375de0348b7f626adebc - jpountz 
- 2018-06-18 16:55:13]

at 
org.apache.solr.update.processor.DistributedUpdateProcessor.versionAdd(DistributedUpdateProcessor.java:1168)
 ~[solr-core-7.4.0.jar:7.4.0 9060ac689c270b02143f375de0348b7f626adebc - jpountz 
- 2018-06-18 16:55:13]

at 
org.apache.solr.update.processor.DistributedUpdateProcessor.processAdd(DistributedUpdateProcessor.java:633)
 ~[solr-core-7.4.0.jar:7.4.0 9060ac689c270b02143f375de0348b7f626adebc - jpountz 
- 2018-06-18 16:55:13]

at 
org.apache.solr.update.processor.LogUpdateProcessorFactory$LogUpdateProcessor.processAdd(LogUpdateProcessorFactory.java:103)
 ~[solr-core-7.4.0.jar:7.4.0 9060ac689c270b02143f375de0348b7f626adebc - jpountz 
- 2018-06-18 16:55:13]

at org.apache.solr.handler.dataimport.SolrWriter.upload(SolrWriter.java:80) 
~[?:?]

at 
org.apache.solr.handler.dataimport.DataImportHandler$1.upload(DataImportHandler.java:258)
 ~[?:?]

at 
org.apache.solr.handler.dataimport.DocBuilder.buildDocument(DocBuilder.java:527)
 ~[?:?]

at 
org.apache.solr.handler.dataimport.DocBuilder.buildDocument(DocBuilder.java:415)
 ~[?:?]

at 
org.apache.solr.handler.dataimport.DocBuilder.doFullDump(DocBuilder.java:330) 
~[?:?]

at org.apache.solr.handler.dataimport.DocBuilder.execute(DocBuilder.java:233) 
~[?:?]

at 
org.apache.solr.handler.dataimport.DataImporter.doFullImport(DataImporter.java:424)
 ~[?:?]

at 
org.apache.solr.handler.dataimport.DataImporter.runCmd(DataImporter.java:483) 
~[?:?]

at 
org.apache.solr.handler.dataimport.DataImporter.lambda$runAsync$0(DataImporter.java:466)
 ~[?:?]

at java.lang.Thread.run(Thread.java:748) [?:1.8.0_172]

Caused by: org.apache.solr.common.SolrException: Multiple values encountered 
for non multiValued copy field authorText: Jeff Hartley

at org.apache.solr.update.DocumentBuilder.toDocument(DocumentBuilder.java:180) 
~[solr-core-7.4.0.jar:7.4.0 9060ac689c270b02143f375de0348b7f626adebc - jpountz 
- 2018-06-18 16:55:13]

... 22 more



Re: Solr core corrupted for version 7.4.0, please help!

2018-08-17 Thread Michael Hu (CMBU)

Can someone advise me how to solve this issue?

Thank you!

--Michael


From: Michael Hu (CMBU)
Sent: Thursday, August 16, 2018 6:14 PM
To: solr-user@lucene.apache.org
Cc: Mohsin Beg
Subject: Solr core corrupted for version 7.4.0, please help!


Environment:

  *   solr 7.4.1
  *   all cores are vanilla cores with "loadOnStartUp" set to false, and 
"transient" set to true
  *   we have about 75 cores with "transientCacheSize" set to 32


Issue: we have core corruption from time to time (2-3 core corruption a day)


How to reproduce:

  *   Set the "transientCacheSize" to 1
  *   Ingest high load to core1 only (no issue at this time)
  *   Continue ingest high load to core1 and start ingest load to core2 
simultaneously (core2 immediately corrupted) (stack trace is attached below)


Please advise how to resolve this issue?


Thank you so much!


--Michael


stack trace:


2018-08-16 23:02:31.212 ERROR (qtp225472281-4098) [   
x:aggregator-core-be43376de27b1675562841f64c498] o.a.s.u.SolrIndexWriter Error 
closing IndexWriter

java.nio.file.NoSuchFileException: 
/opt/solr/volumes/data1/4cf838d4b9e4675-core-897/index/_2_Lucene50_0.pos

at 
sun.nio.fs.UnixException.translateToIOException(UnixException.java:86) 
~[?:1.8.0_162]

at 
sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102) 
~[?:1.8.0_162]

at 
sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107) 
~[?:1.8.0_162]

at 
sun.nio.fs.UnixFileAttributeViews$Basic.readAttributes(UnixFileAttributeViews.java:55)
 ~[?:1.8.0_162]

at 
sun.nio.fs.UnixFileSystemProvider.readAttributes(UnixFileSystemProvider.java:144)
 ~[?:1.8.0_162]

at 
sun.nio.fs.LinuxFileSystemProvider.readAttributes(LinuxFileSystemProvider.java:99)
 ~[?:1.8.0_162]

at java.nio.file.Files.readAttributes(Files.java:1737) ~[?:1.8.0_162]

at java.nio.file.Files.size(Files.java:2332) ~[?:1.8.0_162]

at org.apache.lucene.store.FSDirectory.fileLength(FSDirectory.java:243) 
~[lucene-core-7.4.0.jar:7.4.0 9060ac689c270b02143f375de0348b7f626adebc - 
jpountz - 2018-06-18 16:51:45]

at 
org.apache.lucene.store.NRTCachingDirectory.fileLength(NRTCachingDirectory.java:128)
 ~[lucene-core-7.4.0.jar:7.4.0 9060ac689c270b02143f375de0348b7f626adebc - 
jpountz - 2018-06-18 16:51:45]

at 
org.apache.lucene.index.SegmentCommitInfo.sizeInBytes(SegmentCommitInfo.java:217)
 ~[lucene-core-7.4.0.jar:7.4.0 9060ac689c270b02143f375de0348b7f626adebc - 
jpountz - 2018-06-18 16:51:45]

at org.apache.lucene.index.MergePolicy.size(MergePolicy.java:558) 
~[lucene-core-7.4.0.jar:7.4.0 9060ac689c270b02143f375de0348b7f626adebc - 
jpountz - 2018-06-18 16:51:45]

at 
org.apache.lucene.index.TieredMergePolicy.getSegmentSizes(TieredMergePolicy.java:279)
 ~[lucene-core-7.4.0.jar:7.4.0 9060ac689c270b02143f375de0348b7f626adebc - 
jpountz - 2018-06-18 16:51:45]

at 
org.apache.lucene.index.TieredMergePolicy.findMerges(TieredMergePolicy.java:300)
 ~[lucene-core-7.4.0.jar:7.4.0 9060ac689c270b02143f375de0348b7f626adebc - 
jpountz - 2018-06-18 16:51:45]

at 
org.apache.lucene.index.IndexWriter.updatePendingMerges(IndexWriter.java:2199) 
~[lucene-core-7.4.0.jar:7.4.0 9060ac689c270b02143f375de0348b7f626adebc - 
jpountz - 2018-06-18 16:51:45]

at 
org.apache.lucene.index.IndexWriter.maybeMerge(IndexWriter.java:2162) 
~[lucene-core-7.4.0.jar:7.4.0 9060ac689c270b02143f375de0348b7f626adebc - 
jpountz - 2018-06-18 16:51:45]

at org.apache.lucene.index.IndexWriter.flush(IndexWriter.java:3571) 
~[lucene-core-7.4.0.jar:7.4.0 9060ac689c270b02143f375de0348b7f626adebc - 
jpountz - 2018-06-18 16:51:45]

at org.apache.lucene.index.IndexWriter.shutdown(IndexWriter.java:1028) 
~[lucene-core-7.4.0.jar:7.4.0 9060ac689c270b02143f375de0348b7f626adebc - 
jpountz - 2018-06-18 16:51:45]

at org.apache.lucene.index.IndexWriter.close(IndexWriter.java:1071) 
~[lucene-core-7.4.0.jar:7.4.0 9060ac689c270b02143f375de0348b7f626adebc - 
jpountz - 2018-06-18 16:51:45]

at 
org.apache.solr.update.SolrIndexWriter.close(SolrIndexWriter.java:286) 
[solr-core-7.4.0.jar:7.4.0 9060ac689c270b02143f375de0348b7f626adebc - jpountz - 
2018-06-18 16:55:13]

at 
org.apache.solr.update.DirectUpdateHandler2.closeWriter(DirectUpdateHandler2.java:917)
 [solr-core-7.4.0.jar:7.4.0 9060ac689c270b02143f375de0348b7f626adebc - jpountz 
- 2018-06-18 16:55:13]

at 
org.apache.solr.update.DefaultSolrCoreState.closeIndexWriter(DefaultSolrCoreState.java:105)
 [solr-core-7.4.0.jar:7.4.0 9060ac689c270b02143f375de0348b7f626adebc - jpountz 
- 2018-06-18 16:55:13]

at 
org.apache.solr.update.DefaultSolrCoreState.close(DefaultSolrCoreState.java:399)
 [solr-core-7.4.0.jar:7.4.0 9060ac689c270b02143f375de0348b7f626adebc - jpountz 
- 2018-06-18 16:55:13]

at 
org.apache.solr.update.SolrCoreState.decrefSolrCoreState(SolrCoreState.java:83) 

Re: SolrCloud CDCR with 3+ DCs

2018-08-17 Thread cdatta
Any pointer would be much appreciated..

Thanks..



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


Re: Metrics for a healthy Solr cluster

2018-08-17 Thread Rahul Singh
I wrote something related to this topic a while ago.

https://www.google.com/amp/s/blog.anant.us/resources-for-monitoring-datastax-cassandra-spark-solr-performance/amp/

Rahul
On Aug 16, 2018, 3:35 PM -0700, Jan Høydahl , wrote:
> Check out the Reference Guide chapter on monitoring with open source 
> Prometheus and Grafana.
> https://lucene.apache.org/solr/guide/7_4/monitoring-solr-with-prometheus-and-grafana.html
>  
> 
>
> You'll get a nice dashboard with key metrics and be able to tweak thresholds, 
> alerts etc.
> Note that Solr now has a rich REST based metrics API so you don't need JMX 
> anymore.
> Also, solr has now got some Metrics History capabilities built-in, see 
> https://lucene.apache.org/solr/guide/7_4/metrics-history.html 
> 
>
> --
> Jan Høydahl, search solution architect
> Cominvent AS - www.cominvent.com
>
> > 16. aug. 2018 kl. 17:24 skrev Greenhorn Techie :
> >
> > Hi,
> >
> > Solr provides numerous JMX metrics for monitoring the health of the
> > cluster. We are setting up a SolrCloud cluster and hence wondering what are
> > the important parameters / metrics to look into, to ascertain that the
> > cluster health is good. Obvious things comes to my mind are CPU utilisation
> > and memory utilisation.
> >
> > However, wondering what are the other parameters to look into from the
> > health of the cluster? Are there any best practices?
> >
> > Thanks
>


Handshake for NRT?

2018-08-17 Thread Walter Underwood
How many messages are sent back and forth between a leader and replica with NRT?

We have a collection that gets frequent updates and we are seeing a ton of 
internal
cluster traffic.

wunder
Walter Underwood
wun...@wunderwood.org
http://observer.wunderwood.org/  (my blog)



Re: solr 3.4 do not want to apply synonym mapping term to search matching docs

2018-08-17 Thread ksurya
If we are willing to write the code to change according to our requirement
here, Where and how we should proceed. Any heads-up that you can provide to
help achieve it.

Thanks.



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


Re: loadOnStartup=false doesn't appear to work for Solr 6.6

2018-08-17 Thread Tom Burton-West
Thanks Erick,

Silly oversight on my part.  I went into the admin panel and used the core
selector to view information about the core and it was running.
I did some more thinking about it and restarted solr and looked at the core
admin panel where I could see that the startTime was "-".

So the problem is operator error.  I didn't think about how the core
selector actually sends a query to the core to get stats, which of course
starts the core.


Tom

On Fri, Aug 17, 2018 at 12:18 PM, Erick Erickson 
wrote:

> Tom:
>
> That hasn't been _intentionally_ changed. However, any request that
> comes in (update or query) will permanently load the core (assuming no
> transient cores), and any request to the core will autoload it. How
> are you determining that the core hasn't been loaded? And are there
> any background tasks that could be causing them to load (autowarming
> in solrconfig doesn't count).
>
> On Fri, Aug 17, 2018 at 8:57 AM, Tom Burton-West 
> wrote:
> > Hello,
> >
> > I'm not using SolrCloud and want to have some cores not load when Solr
> > starts up.
> > I tried loadOnStartup=false, but the cores seem to start up anyway.
> >
> > Is the loadOnStartup parameter still usable with Solr 6.6 or does the
> > documentation need updating?
> >  Or  Is there something else I need to do/set?
> >
> > Tom
>


Re: loadOnStartup=false doesn't appear to work for Solr 6.6

2018-08-17 Thread Erick Erickson
Tom:

That hasn't been _intentionally_ changed. However, any request that
comes in (update or query) will permanently load the core (assuming no
transient cores), and any request to the core will autoload it. How
are you determining that the core hasn't been loaded? And are there
any background tasks that could be causing them to load (autowarming
in solrconfig doesn't count).

On Fri, Aug 17, 2018 at 8:57 AM, Tom Burton-West  wrote:
> Hello,
>
> I'm not using SolrCloud and want to have some cores not load when Solr
> starts up.
> I tried loadOnStartup=false, but the cores seem to start up anyway.
>
> Is the loadOnStartup parameter still usable with Solr 6.6 or does the
> documentation need updating?
>  Or  Is there something else I need to do/set?
>
> Tom


loadOnStartup=false doesn't appear to work for Solr 6.6

2018-08-17 Thread Tom Burton-West
Hello,

I'm not using SolrCloud and want to have some cores not load when Solr
starts up.
I tried loadOnStartup=false, but the cores seem to start up anyway.

Is the loadOnStartup parameter still usable with Solr 6.6 or does the
documentation need updating?
 Or  Is there something else I need to do/set?

Tom


Re: Point Alias to New Collection

2018-08-17 Thread Shawn Heisey
On 8/17/2018 7:55 AM, THADC wrote:
> Is there is a way to redirect an existing alias to a new collection. I know
> how to create an alias and assign it to a collection, but I need a way to
> redirect in periodically to a different collection. Any ideas appreciated.

Just create the alias again.  It will replace the existing alias.

Thanks,
Shawn



Re: Contextual Synonym Filter

2018-08-17 Thread Doug Turnbull
Would one option be to change the query analyzer at query time? The Match
Query Parser (https://github.com/o19s/match-query-parser), would let you do
this

-Doug

On Fri, Aug 17, 2018 at 8:04 AM Vergantini Luca 
wrote:

> I need to create a contextual Synonym Filter:
>
>
>
> I need that the Synonym Filter load different synonym configuration based
> on the fq query parameter.
>
>
>
> I’ve already modified the SynonymGraphFilterFactory to load from DB (this
> is another requirement) but I can’t understand how to make the fq parameter
> arrive to the Factory.
>
>
>
> Maybe I need a Query Parser plugin?
>
>
>
> Please help
>
>
> Luca Vergantini
>
> Whitehall Reply
> Via del Giorgione, 59
> 00147 - Roma - ITALY
> phone: +39 06 844341 <+39%2006%20844341>
> l.vergant...@reply.it
> www.reply.it
>
> [image: Whitehall Reply]
>
-- 
CTO, OpenSource Connections
Author, Relevant Search
http://o19s.com/doug


Re: How to resolve PostgreSQL array in solr

2018-08-17 Thread Shawn Heisey
On 8/16/2018 5:23 PM, Hai Shang wrote:
> Hi solr-user,
>
> I got trouble resolving PostgreSQL text array with data import in solr 7.4.
> In schema, I tried multiValued with both true and false, also tried
> string/strings/text_general, while none of them worked.
>
> Here is the exception message:
>
> org.apache.solr.common.SolrException: TransactionLog doesn't know how to
> serialize class org.postgresql.jdbc.PgArray; try implementing
> ObjectResolver?

The JDBC driver is returning an object type that the dataimport handler
does not know how to handle.  It's a special postgres type.  Instead of
silently ignoring that data, it has chosen to thrown an error so that
you know there's something it can't handle.

You're going to need to ask the Postgres people for the proper SQL
syntax to turn that column into a string instead of an array object, and
then the Solr config is going to need either a RegexTransformer in DIH
or some kind of analysis in your schema that can split the string into
separate parts.

Alternately, you could create a custom transformer for DIH that knows
how to handle that object type and can adjust the document that DIH is
building.

Thanks,
Shawn



Re: solr 3.4 do not want to apply synonym mapping term to search matching docs

2018-08-17 Thread Shawn Heisey
On 8/14/2018 5:35 AM, surya wrote:
> The following data is getting indexed-in to our solr.
>
> doc1:
> University of Virginia 
> doc2:
> Katrina Uva 
> doc3:
> University of new york 
>
> synonym.txt
>University of Virginia, uva
>
> search term:
>University of Virginia
>
> Expected result:
>doc1
>
> Actual result:
>doc1 and doc2 
>
> the second document is coming because the synonym term "uva" is matching
> with doc2: Katrina Uva
> Requirement:
> We do not want to apply the synonym (uva) to bring the  doc2 (Katie Uva)

Unless you want to write special code to change how Solr works, you
cannot pick and choose to apply synonyms to some documents but not
others.  The synonyms are always going to apply.  The synonyms you have
chosen will cause this match to happen.

You could instead use this format in your synonyms file for a one-way
translation, but then you would not be able to do the search for the
full text and match documents where "UVA" is actually used to mean the
university:

university of virginia => uva

Multi-word synonyms don't work properly unless the 'sow' parameter is
set to false.  This is the default setting since 7.0.

Thanks,
Shawn



Point Alias to New Collection

2018-08-17 Thread THADC
Hi,

Is there is a way to redirect an existing alias to a new collection. I know
how to create an alias and assign it to a collection, but I need a way to
redirect in periodically to a different collection. Any ideas appreciated.
Thanks!



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


solr 3.4 do not want to apply synonym mapping term to search matching docs

2018-08-17 Thread ksurya
Actual result:
   doc1 and doc2 

the second document is coming because the synonym term "uva" is matching
with doc2: Katrina Uva
Requirement:
We do not want to apply the synonym (uva) to bring the  doc2 (Katrina Uva)

The following is our solr setup version 3.4 analyzers 

/




  
   

  







  


/



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


How to resolve PostgreSQL array in solr

2018-08-17 Thread Hai Shang
Hi solr-user,

I got trouble resolving PostgreSQL text array with data import in solr 7.4.
In schema, I tried multiValued with both true and false, also tried
string/strings/text_general, while none of them worked.

Here is the exception message:

org.apache.solr.common.SolrException: TransactionLog doesn't know how to
serialize class org.postgresql.jdbc.PgArray; try implementing
ObjectResolver?

at org.apache.solr.update.TransactionLog$1.resolve(TransactionLog.java:99)
~[solr-core-7.4.0.jar:7.4.0 9060ac689c270b02143f375de0348b7f626adebc -
jpountz - 2018-06-18 16:55:13]

at org.apache.solr.common.util.JavaBinCodec.writeVal(JavaBinCodec.java:239)
~[solr-solrj-7.4.0.jar:7.4.0 9060ac689c270b02143f375de0348b7f626adebc -
jpountz - 2018-06-18 16:55:14]

at
org.apache.solr.common.util.JavaBinCodec.writeSolrInputDocument(JavaBinCodec.java:616)
~[solr-solrj-7.4.0.jar:7.4.0 9060ac689c270b02143f375de0348b7f626adebc -
jpountz - 2018-06-18 16:55:14]

at org.apache.solr.update.TransactionLog.write(TransactionLog.java:370)
~[solr-core-7.4.0.jar:7.4.0 9060ac689c270b02143f375de0348b7f626adebc -
jpountz - 2018-06-18 16:55:13]

at org.apache.solr.update.UpdateLog.add(UpdateLog.java:571)
~[solr-core-7.4.0.jar:7.4.0 9060ac689c270b02143f375de0348b7f626adebc -
jpountz - 2018-06-18 16:55:13]

at org.apache.solr.update.UpdateLog.add(UpdateLog.java:550)
~[solr-core-7.4.0.jar:7.4.0 9060ac689c270b02143f375de0348b7f626adebc -
jpountz - 2018-06-18 16:55:13]

at
org.apache.solr.update.DirectUpdateHandler2.doNormalUpdate(DirectUpdateHandler2.java:366)
~[solr-core-7.4.0.jar:7.4.0 9060ac689c270b02143f375de0348b7f626adebc -
jpountz - 2018-06-18 16:55:13]

at
org.apache.solr.update.DirectUpdateHandler2.addDoc0(DirectUpdateHandler2.java:284)
~[solr-core-7.4.0.jar:7.4.0 9060ac689c270b02143f375de0348b7f626adebc -
jpountz - 2018-06-18 16:55:13]

at
org.apache.solr.update.DirectUpdateHandler2.addDoc(DirectUpdateHandler2.java:234)
~[solr-core-7.4.0.jar:7.4.0 9060ac689c270b02143f375de0348b7f626adebc -
jpountz - 2018-06-18 16:55:13]

at
org.apache.solr.update.processor.RunUpdateProcessor.processAdd(RunUpdateProcessorFactory.java:67)
~[solr-core-7.4.0.jar:7.4.0 9060ac689c270b02143f375de0348b7f626adebc -
jpountz - 2018-06-18 16:55:13]

at
org.apache.solr.update.processor.UpdateRequestProcessor.processAdd(UpdateRequestProcessor.java:55)
~[solr-core-7.4.0.jar:7.4.0 9060ac689c270b02143f375de0348b7f626adebc -
jpountz - 2018-06-18 16:55:13]

at
org.apache.solr.update.processor.DistributedUpdateProcessor.doLocalAdd(DistributedUpdateProcessor.java:950)
~[solr-core-7.4.0.jar:7.4.0 9060ac689c270b02143f375de0348b7f626adebc -
jpountz - 2018-06-18 16:55:13]

at
org.apache.solr.update.processor.DistributedUpdateProcessor.versionAdd(DistributedUpdateProcessor.java:1168)
~[solr-core-7.4.0.jar:7.4.0 9060ac689c270b02143f375de0348b7f626adebc -
jpountz - 2018-06-18 16:55:13]

at
org.apache.solr.update.processor.DistributedUpdateProcessor.processAdd(DistributedUpdateProcessor.java:633)
~[solr-core-7.4.0.jar:7.4.0 9060ac689c270b02143f375de0348b7f626adebc -
jpountz - 2018-06-18 16:55:13]

at
org.apache.solr.update.processor.LogUpdateProcessorFactory$LogUpdateProcessor.processAdd(LogUpdateProcessorFactory.java:103)
~[solr-core-7.4.0.jar:7.4.0 9060ac689c270b02143f375de0348b7f626adebc -
jpountz - 2018-06-18 16:55:13]

at
org.apache.solr.update.processor.UpdateRequestProcessor.processAdd(UpdateRequestProcessor.java:55)
~[solr-core-7.4.0.jar:7.4.0 9060ac689c270b02143f375de0348b7f626adebc -
jpountz - 2018-06-18 16:55:13]

at
org.apache.solr.update.processor.AddSchemaFieldsUpdateProcessorFactory$AddSchemaFieldsUpdateProcessor.processAdd(AddSchemaFieldsUpdateProcessorFactory.java:475)
~[solr-core-7.4.0.jar:7.4.0 9060ac689c270b02143f375de0348b7f626adebc -
jpountz - 2018-06-18 16:55:13]

at
org.apache.solr.update.processor.UpdateRequestProcessor.processAdd(UpdateRequestProcessor.java:55)
~[solr-core-7.4.0.jar:7.4.0 9060ac689c270b02143f375de0348b7f626adebc -
jpountz - 2018-06-18 16:55:13]

at
org.apache.solr.update.processor.FieldMutatingUpdateProcessor.processAdd(FieldMutatingUpdateProcessor.java:118)
~[solr-core-7.4.0.jar:7.4.0 9060ac689c270b02143f375de0348b7f626adebc -
jpountz - 2018-06-18 16:55:13]

at
org.apache.solr.update.processor.UpdateRequestProcessor.processAdd(UpdateRequestProcessor.java:55)
~[solr-core-7.4.0.jar:7.4.0 9060ac689c270b02143f375de0348b7f626adebc -
jpountz - 2018-06-18 16:55:13]

at
org.apache.solr.update.processor.FieldMutatingUpdateProcessor.processAdd(FieldMutatingUpdateProcessor.java:118)
~[solr-core-7.4.0.jar:7.4.0 9060ac689c270b02143f375de0348b7f626adebc -
jpountz - 2018-06-18 16:55:13]

at
org.apache.solr.update.processor.UpdateRequestProcessor.processAdd(UpdateRequestProcessor.java:55)
~[solr-core-7.4.0.jar:7.4.0 9060ac689c270b02143f375de0348b7f626adebc -
jpountz - 2018-06-18 16:55:13]

at
org.apache.solr.update.processor.FieldMutatingUpdateProcessor.processAdd(FieldMutatingUpdateProcessor.java:118)
~[solr-core-7.4.0.jar:7.4.0 

Re: how to get current timestamp

2018-08-17 Thread Alexandre Rafalovitch
Timestamp of what exactly?

If it is the general server timestamp, I think it would usually be
part of the HTTP Headers of the response.

If you are talking about the record creation date, you can set NOW as
a default field value for a date field.

If you are doing some timestamp math in the query per document, a
function query 'ms' may be the answer:
https://lucene.apache.org/solr/guide/7_4/function-queries.html#ms-function

Regards,
   Alex.

On 17 August 2018 at 01:27, Midas A  wrote:
> Hi,
> i my use case i want to get current timestamp in response of solr query.
>
> how can i do it . is it doable ?
>
> Regards,
> Midas


Re: how to get current timestamp

2018-08-17 Thread Shawn Heisey

On 8/16/2018 11:27 PM, Midas A wrote:

Hi,
i my use case i want to get current timestamp in response of solr query.

how can i do it . is it doable ?


I don't think you can.  There MIGHT be a function query that can do it, 
but it's not something I'm aware of without research.


The machine where you are running the query should have its own clock, 
you can get that without talking to Solr at all.


Thanks,
Shawn



RE: Contextual Synonym Filter

2018-08-17 Thread Markus Jelsma
Hello,

If you are using Dismax or Edismax, you can easily extend the QParser and 
reconstruct your analyzer on-the-fly, based on what you find in the filter 
query. Be sure to keep a cache of the analyzer because construction can be very 
heavy.

Check the Edismax code, it offers clear examples on how to do it, e.g. 
reconstructing the existing analyzer but without the StopFilter based on some 
parameter.

Regards,
Markus

 
 
-Original message-
> From:Vergantini Luca 
> Sent: Friday 17th August 2018 14:04
> To: solr-user@lucene.apache.org
> Subject: Contextual Synonym Filter
> 
> I need to create a contextual Synonym Filter: 
> I need that the Synonym Filter load different synonym configuration based on 
> the fq query parameter. 
> Ive already modified the SynonymGraphFilterFactory to load from DB (this is 
> another requirement) but I cant understand how to make the fq parameter 
> arrive to the Factory. 
> Maybe I need a Query Parser plugin? 
> Please help 
> 
> 
 
> Luca Vergantini
> 
> Whitehall Reply
>  
 
> Via del Giorgione, 59
 
> 00147 - Roma - ITALY
> phone: +39 06 844341 
> l.vergant...@reply.it 
> www.reply.it  
 
>  <>   
> 
> 
 


Contextual Synonym Filter

2018-08-17 Thread Vergantini Luca
I need to create a contextual Synonym Filter:

I need that the Synonym Filter load different synonym configuration based on 
the fq query parameter.

I've already modified the SynonymGraphFilterFactory to load from DB (this is 
another requirement) but I can't understand how to make the fq parameter arrive 
to the Factory.

Maybe I need a Query Parser plugin?

Please help


Luca Vergantini

Whitehall Reply
Via del Giorgione, 59
00147 - Roma - ITALY
phone: +39 06 844341
l.vergant...@reply.it
www.reply.it

[Whitehall Reply]


Re: Docvalue v.s. invert index

2018-08-17 Thread Mikhail Khludnev
org.apache.lucene.search.IndexOrDocValuesQuery might be also relevant.

On Mon, Aug 13, 2018 at 9:02 AM Zahra Aminolroaya 
wrote:

> Thanks Erick, Shawn and Tomoko for complete answers.
>
> If I set both docvalue and indexed "true" in a field, will Solr understand
> to use which technique for faceting or searching? Or Is there any way to
> inform Solr to use which technique?
>
>
>
> --
> Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html
>


-- 
Sincerely yours
Mikhail Khludnev