Re: Date Comparison in SOLR

2016-11-07 Thread Sadheera Vithanage
Thanks Erick.

I tried with function queries, but still not getting it right, may be not
using it the correct way.

If someone can let me know how to get the difference of 2 date fields, I
think that might help.

Thank you.

On Tue, Nov 8, 2016 at 11:55 AM, Erick Erickson 
wrote:

> This looks much more like a function query
>
> Best,
> Erick
>
> On Mon, Nov 7, 2016 at 4:18 PM, Sadheera Vithanage 
> wrote:
> > Hi Experts,
> >
> > I am trying to compare dates as below in SOLR and not getting the syntax
> > right.
> > If someone could help, It will be so great.
> >
> >
> > _SolrIntField__i+NOW:{NOW TO *}
> >
> > Basically what i am trying to do is add an existing int field in solr to
> > current date and compare it with another date field.
> >
> > I am getting the below error doing so.
> >
> > "msg":"undefined field: \"_SolrIntField__i+NOW\"",
> >
> > Thank you very much.
> >
> >
> >
> > --
> > Regards
> >
> > Sadheera Vithanage
>



-- 
Regards

Sadheera Vithanage


Re: Date Comparison in SOLR

2016-11-07 Thread Erick Erickson
This looks much more like a function query

Best,
Erick

On Mon, Nov 7, 2016 at 4:18 PM, Sadheera Vithanage  wrote:
> Hi Experts,
>
> I am trying to compare dates as below in SOLR and not getting the syntax
> right.
> If someone could help, It will be so great.
>
>
> _SolrIntField__i+NOW:{NOW TO *}
>
> Basically what i am trying to do is add an existing int field in solr to
> current date and compare it with another date field.
>
> I am getting the below error doing so.
>
> "msg":"undefined field: \"_SolrIntField__i+NOW\"",
>
> Thank you very much.
>
>
>
> --
> Regards
>
> Sadheera Vithanage


Date Comparison in SOLR

2016-11-07 Thread Sadheera Vithanage
Hi Experts,

I am trying to compare dates as below in SOLR and not getting the syntax
right.
If someone could help, It will be so great.


_SolrIntField__i+NOW:{NOW TO *}

Basically what i am trying to do is add an existing int field in solr to
current date and compare it with another date field.

I am getting the below error doing so.

"msg":"undefined field: \"_SolrIntField__i+NOW\"",

Thank you very much.



-- 
Regards

Sadheera Vithanage


Re: Re-register a deleted Collection SorlCloud

2016-11-07 Thread Erick Erickson
You've got it. You should be quite safe if you
1> create the same number of shards as you used to have
2> match the shard bits. I.e. collection1_shard1_replica1 as long as
the collection1_shard# parts match you should be fine. If this isn't
done correctly, the symptom will be that when you update an existing
document, you may have two copies returned eventually.

Best,
Erick

On Mon, Nov 7, 2016 at 1:47 PM, Chetas Joshi  wrote:
> Thanks Erick.
>
> I had replicationFactor=1 in my old collection and going to have the same
> config for the new collection.
> When I create a new collection with number of Shards =20 and max shards per
> node = 1, the shards are going to start on 20 hosts out of my 25 hosts Solr
> cluster. When you say "get each shard's index to the corresponding shard on
> your new collection", do you mean the following?
>
> shard1_replica1 -> core_node1 (old collection)
> shard1_replica1 -> has to be core_node1 (new collection) (I don't have this
> mapping for the old collection as the collection no longer exists!!)
>
> Thanks,
> Chetas.
>
> On Mon, Nov 7, 2016 at 1:03 PM, Erick Erickson 
> wrote:
>
>> That should work. The caveat here is that you need to get the each
>> shards index to the corresponding shard on your new collection.
>>
>> Of course I'd back up _all_ of these indexes before even starting.
>>
>> And one other trick. First create your collection with 1 replica per
>> shard (leader-only). Then copy the indexes (and, btw, I'd have the
>> associated Solr nodes down during the copy) and verify the collection
>> is as you'd expect.
>>
>> Now use ADDREPLICA to expand your collection, that'll handle the
>> copying from the leader correctly.
>>
>> Best,
>> Erick
>>
>> On Mon, Nov 7, 2016 at 12:49 PM, Chetas Joshi 
>> wrote:
>> > I have a Solr Cloud deployed on top of HDFS.
>> >
>> > I accidentally deleted a collection using the collection API. So,
>> ZooKeeper
>> > cluster has lost all the info related to that collection. I don't have a
>> > backup that I can restore from. However, I have indices and transaction
>> > logs on HDFS.
>> >
>> > If I create a new collection and copy the existing data directory to the
>> > data directory path of the new collection I have created, will I be able
>> to
>> > go back to the state where I was? Is there anything else I would have to
>> do?
>> >
>> > Thanks,
>> >
>> > Chetas.
>>


ClassNotFoundException with Custom ZkACLProvider

2016-11-07 Thread Solr User
This is mostly just an FYI regarding future work on issues like SOLR-8792.

I wanted admin update but world read on ZK since I do not have anything
sensitive from a read perspective in the Solr data and did not want to
force all SolrCloud clients to implement authentication just for read.  So,
I extended DefaultZkACLProvider and implemented a replacement for
VMParamsAllAndReadonlyDigestZkACLProvider.

My custom code is loaded from the sharedLib in solr.xml.  However, there is
a temporary ZK lookup to read solr.xml (and chroot) which is obviously done
before loading sharedLib.  Therefore, I am faced with a
ClassNotFoundException.  This has no negative effect on the ACL
functionalityjust the annoying stack trace in the logs.  I do not want
to package this custom code with the Solr code and do not want to package
this along with Solr dependencies in the Jetty lib/ext.

So, I am planning to live with the stack trace and just wanted to share
this for any future work on the dynamic solr.xml and chroot lookups or in
case I am missing some work-around.

Thanks!


Re: Re-register a deleted Collection SorlCloud

2016-11-07 Thread Chetas Joshi
Thanks Erick.

I had replicationFactor=1 in my old collection and going to have the same
config for the new collection.
When I create a new collection with number of Shards =20 and max shards per
node = 1, the shards are going to start on 20 hosts out of my 25 hosts Solr
cluster. When you say "get each shard's index to the corresponding shard on
your new collection", do you mean the following?

shard1_replica1 -> core_node1 (old collection)
shard1_replica1 -> has to be core_node1 (new collection) (I don't have this
mapping for the old collection as the collection no longer exists!!)

Thanks,
Chetas.

On Mon, Nov 7, 2016 at 1:03 PM, Erick Erickson 
wrote:

> That should work. The caveat here is that you need to get the each
> shards index to the corresponding shard on your new collection.
>
> Of course I'd back up _all_ of these indexes before even starting.
>
> And one other trick. First create your collection with 1 replica per
> shard (leader-only). Then copy the indexes (and, btw, I'd have the
> associated Solr nodes down during the copy) and verify the collection
> is as you'd expect.
>
> Now use ADDREPLICA to expand your collection, that'll handle the
> copying from the leader correctly.
>
> Best,
> Erick
>
> On Mon, Nov 7, 2016 at 12:49 PM, Chetas Joshi 
> wrote:
> > I have a Solr Cloud deployed on top of HDFS.
> >
> > I accidentally deleted a collection using the collection API. So,
> ZooKeeper
> > cluster has lost all the info related to that collection. I don't have a
> > backup that I can restore from. However, I have indices and transaction
> > logs on HDFS.
> >
> > If I create a new collection and copy the existing data directory to the
> > data directory path of the new collection I have created, will I be able
> to
> > go back to the state where I was? Is there anything else I would have to
> do?
> >
> > Thanks,
> >
> > Chetas.
>


Re: Re-register a deleted Collection SorlCloud

2016-11-07 Thread Erick Erickson
That should work. The caveat here is that you need to get the each
shards index to the corresponding shard on your new collection.

Of course I'd back up _all_ of these indexes before even starting.

And one other trick. First create your collection with 1 replica per
shard (leader-only). Then copy the indexes (and, btw, I'd have the
associated Solr nodes down during the copy) and verify the collection
is as you'd expect.

Now use ADDREPLICA to expand your collection, that'll handle the
copying from the leader correctly.

Best,
Erick

On Mon, Nov 7, 2016 at 12:49 PM, Chetas Joshi  wrote:
> I have a Solr Cloud deployed on top of HDFS.
>
> I accidentally deleted a collection using the collection API. So, ZooKeeper
> cluster has lost all the info related to that collection. I don't have a
> backup that I can restore from. However, I have indices and transaction
> logs on HDFS.
>
> If I create a new collection and copy the existing data directory to the
> data directory path of the new collection I have created, will I be able to
> go back to the state where I was? Is there anything else I would have to do?
>
> Thanks,
>
> Chetas.


how to add file date ?

2016-11-07 Thread win harrington
I'm using the bin/post tool to insert text and PDF files into Solr.
I'd like to add the file last modified dateto the schema.

How do I put the file's date into file_data?
Thank you


Re-register a deleted Collection SorlCloud

2016-11-07 Thread Chetas Joshi
I have a Solr Cloud deployed on top of HDFS.

I accidentally deleted a collection using the collection API. So, ZooKeeper
cluster has lost all the info related to that collection. I don't have a
backup that I can restore from. However, I have indices and transaction
logs on HDFS.

If I create a new collection and copy the existing data directory to the
data directory path of the new collection I have created, will I be able to
go back to the state where I was? Is there anything else I would have to do?

Thanks,

Chetas.


Re: High CPU Usage in export handler

2016-11-07 Thread Ray Niu
Hello:
   Any follow up?

2016-11-03 11:18 GMT-07:00 Ray Niu :

> the soft commit is 15 seconds and hard commit is 10 minutes.
>
> 2016-11-03 11:11 GMT-07:00 Erick Erickson :
>
>> Followup question: You say you're indexing 100 docs/second.  How often
>> are you _committing_? Either
>> soft commit
>> or
>> hardcommit with openSearcher=true
>>
>> ?
>>
>> Best,
>> Erick
>>
>> On Thu, Nov 3, 2016 at 11:00 AM, Ray Niu  wrote:
>> > Thanks Joel
>> > here is the information you requested.
>> > Are you doing heavy writes at the time?
>> > we are doing write very frequently, but not very heavy, we will update
>> > about 100 solr document per second.
>> > How many concurrent reads are are happening?
>> > the concurrent reads are about 1000-2000 per minute per node
>> > What version of Solr are you using?
>> > we are using solr 5.5.2
>> > What is the field definition for the double, is it docValues?
>> > the field definition is
>> > > > docValues="true"/>
>> >
>> >
>> > 2016-11-03 6:30 GMT-07:00 Joel Bernstein :
>> >
>> >> Are you doing heavy writes at the time?
>> >>
>> >> How many concurrent reads are are happening?
>> >>
>> >> What version of Solr are you using?
>> >>
>> >> What is the field definition for the double, is it docValues?
>> >>
>> >>
>> >>
>> >>
>> >> Joel Bernstein
>> >> http://joelsolr.blogspot.com/
>> >>
>> >> On Thu, Nov 3, 2016 at 12:56 AM, Ray Niu  wrote:
>> >>
>> >> > Hello:
>> >> >We are using export handler in Solr Cloud to get some data, we
>> only
>> >> > request for one field, which type is tdouble, it works well at the
>> >> > beginning, but recently we saw high CPU issue in all the solr cloud
>> >> nodes,
>> >> > we took some thread dump and found following information:
>> >> >
>> >> >java.lang.Thread.State: RUNNABLE
>> >> >
>> >> > at java.lang.Thread.isAlive(Native Method)
>> >> >
>> >> > at
>> >> > org.apache.lucene.util.CloseableThreadLocal.purge(
>> >> > CloseableThreadLocal.java:115)
>> >> >
>> >> > - locked <0x0006e24d86a8> (a java.util.WeakHashMap)
>> >> >
>> >> > at
>> >> > org.apache.lucene.util.CloseableThreadLocal.maybePurge(
>> >> > CloseableThreadLocal.java:105)
>> >> >
>> >> > at
>> >> > org.apache.lucene.util.CloseableThreadLocal.get(
>> >> > CloseableThreadLocal.java:88)
>> >> >
>> >> > at
>> >> > org.apache.lucene.index.CodecReader.getNumericDocValues(
>> >> > CodecReader.java:143)
>> >> >
>> >> > at
>> >> > org.apache.lucene.index.FilterLeafReader.getNumericDocValues(
>> >> > FilterLeafReader.java:430)
>> >> >
>> >> > at
>> >> > org.apache.lucene.uninverting.UninvertingReader.getNumericDocValues(
>> >> > UninvertingReader.java:239)
>> >> >
>> >> > at
>> >> > org.apache.lucene.index.FilterLeafReader.getNumericDocValues(
>> >> > FilterLeafReader.java:430)
>> >> >
>> >> > Is this a known issue for export handler? As we only fetch up to 5000
>> >> > documents, it should not be data volume issue.
>> >> >
>> >> > Can anyone help on that? Thanks a lot.
>> >> >
>> >>
>>
>
>


Search across nested child docs

2016-11-07 Thread Vinod Singh
I have nested documents indexed in SOLR 6.2. The block join query works well
on both parent and child documents. My use case has a scenario where a
condition needs to be fulfilled across two child docs as shown below -

fq={!parent which=PARENT_DOC_TYPE:PARENT}(childA_field_1:432 AND
childA_field_2:6)

But this does not give any results though indexed documents has data that
fulfills the condition.

How can I have search condition that spans multiple child docs ?

Regards,
Vinod



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Search-across-nested-child-docs-tp4304956.html
Sent from the Solr - User mailing list archive at Nabble.com.


Change Solr contextPath =“/“ ?

2016-11-07 Thread matthew grisius
I previously asked this question and did not receive any suggestions.
I also asked on Jetty-Users and one person suggested I ask again here so I 
thought it might be worth it to ask again.

Solr is deployed to “/solr” and is then mapped to “/“, e.g. 
http://localhost:8983/  gets mapped to 
http://localhost:8983/solr/# .
I want to put a different servlet at “/“ while preserving Solr functionality at 
“/solr”.
The reason for this is that I previously deployed my app with Solr on 
tomcat/tomee via war file and now want to use a current Solr release using 
Solr/Jetty.

I thought the way to accomplish that was to re-assign  the "root context", e.g. 
contextPath =“/“ but cannot find a way to do this with Solr/Jetty.

My unsuccessful attempts included:

- edit contexts/solr-jetty-context.xml (contextPath, add resourceBase, etc.)
- unmap solr rewrite rule to pass thru . . .
- edit other '/contexts/' . . .
- edit etc/webdefault.xml . . .
- bin/solr does not appear to affect "/"
- org.apache.solr.util.SolrCLI does not appear to affect "/"

Perhaps I’m not trying the right combination of things in the right order to 
solve the issue, but I’ve run out of simple ideas to try.

Does anyone have any other suggestions?
Thank you, any help would be appreciated!

-matt.

Re: edismax, phrase field gets ignored for keyword tokenizer

2016-11-07 Thread Stefan Matheis
Which is everything fine by itself - but doesn’t shed more light on my
initial question Vincenzo, does it? probably i shoudn’t have mentioned
partial matches in the first place, that might have lead into the
wrong direction - they are not relevant for now / not for this
question.

I’d like to know why & where edismax drops out phrase fields which are
using a Keyword Tokenizer. Maybe there is a larger idea behind this
behavior, but i don’t see it (yet).

-Stefan


On November 7, 2016 at 5:09:04 PM, Vincenzo D'Amore (v.dam...@gmail.com) wrote:
> If you don't want partial matches with edismax you should always use
> StandardTokenizerFactory and play with mm parameter.
>
> On Mon, Nov 7, 2016 at 4:50 PM, Stefan Matheis
> wrote:
>
> > Vincenzo,
> >
> > thanks for the response - i know that only the Keyword Tokenizer by
> > itself does not do anything. as pointed at the end of the initial
> > mail, i’m applying a pattern replace for everything non-numeric to
> > make it actually useful.
> >
> > and especially because of the tokenization based on whitespaces i’d
> > like to use the very same field once again as phrase field to around
> > this issue. Shawn mentioned in #solr in the meantime that there is
> > SOLR-9185 which is similar and would be helpful, but currently very
> > very in-the-works.
> >
> > Standard Tokenizer you’ve mentioned does split on whitespace - as
> > edismax does by default in the first place. so i’m not sure how that
> > would help? For now, i don’t want to have partial matches on phone
> > numbers .. at least not yet.
> >
> > -Stefan
> >
> >
> > On November 7, 2016 at 4:41:50 PM, Vincenzo D'Amore (v.dam...@gmail.com)
> > wrote:
> > > Hi Stefan,
> > >
> > > I think the problem is solr.KeywordTokenizerFactory.
> > > This tokeniser does not make any tokenisation to the string, it returns
> > > exactly what you have.
> > >
> > > '+49 1234 12345678' -> '+49 1234 12345678'
> > >
> > > On the other hand, using edismax you are looking for '+49', '1234' and
> > > '12345678' and none of these keywords match your phone_number field.
> > >
> > > Try using a different tokenizer like solr.StandardTokenizerFactory, this
> > > should change your results.
> > >
> > > Bests,
> > > Vincenzo
> > >
> > > On Mon, Nov 7, 2016 at 4:05 PM, Stefan Matheis
> > > wrote:
> > >
> > > > I’m guessing that i’m missing something obvious here - so feel free to
> > > > ask for more details and as well point out other directions i should
> > > > following.
> > > >
> > > > the problem goes as follows: the input in one case might be a phone
> > > > number (like +49 1234 12345678), since we’re using edismax the parts
> > > > gets split on whitespaces - which is fine. bringing the same field
> > > > (based on TextField) to the party (using qf) doesn’t change a thing.
> > > >
> > > > > responseHeader:
> > > > > params:
> > > > > q: '+49 1234 12345678'
> > > > > defType: edismax
> > > > > qf: person_mobile
> > > > > pf: person_mobile^5
> > > > > debug:
> > > > > rawquerystring: '+49 1234 12345678'
> > > > > querystring: '+49 1234 12345678'
> > > > > parsedquery: '(+(+DisjunctionMaxQuery((person_mobile:49))
> > > > DisjunctionMaxQuery((person_mobile:1234)) DisjunctionMaxQuery((person_
> > mobile:12345678)))
> > > > ())/no_coord'
> > > > > parsedquery_toString: '+(+(person_mobile:49) (person_mobile:1234)
> > > > (person_mobile:12345678)) ()’
> > > >
> > > > but .. as far as i was able to reduce the culprit, that only happens
> > > > when i’m using solr.KeywordTokenizerFactory . as soon as i’m changing
> > > > that to solr.StandardTokenizerFactory the phrase query appears as
> > > > expected:
> > > >
> > > > > responseHeader:
> > > > > params:
> > > > > q: '+49 1234 12345678'
> > > > > defType: edismax
> > > > > qf: person_mobile
> > > > > pf: person_mobile^5
> > > > > debug:
> > > > > rawquerystring: '+49 1234 12345678'
> > > > > querystring: '+49 1234 12345678'
> > > > > parsedquery: '(+(+DisjunctionMaxQuery((person_mobile:49))
> > > > DisjunctionMaxQuery((person_mobile:1234)) DisjunctionMaxQuery((person_
> > mobile:12345678)))
> > > > DisjunctionMaxQuery(((person_mobile:"49 1234
> > 12345678")^5.0)))/no_coord'
> > > > > parsedquery_toString: '+(+(person_mobile:49) (person_mobile:1234)
> > > > (person_mobile:12345678)) ((person_mobile:"49 1234 12345678")^5.0)’
> > > >
> > > > removing the + at the beginning, doesn’t make a difference either
> > > > (just mentioning since tokee already asked this on #solr, where i’ve
> > > > brought up the question earlier)
> > > >
> > > > it’s absolutely possible i’m focusing on a very wrong assumption - but
> > > > since switching the tokenizer does result in such a rather large
> > > > behaviour change, i think something is spooky here.
> > > >
> > > > i’ve read older issues and posts from the list, some of them pointed
> > > > out that it might be a optimization that edismax brings to the table -
> > > > i didn’t find anything specific about that.
> > > >
> > > > oh, and btw: if that would be wo

Re: load balancer for solr

2016-11-07 Thread John Bickerstaff
So from a "load balancing" perspective, you may want to consider using
SolrCloud...  It was designed (as I understand it) to be able to handle
large loads, although to understand how it will work in your situation you
will have to test.

On Mon, Nov 7, 2016 at 6:29 AM, Mugeesh Husain  wrote:

> Thanks Shawn Heisey,Its seems impression, let me try it on POC.
>
>
>
> --
> View this message in context: http://lucene.472066.n3.
> nabble.com/load-balancer-for-solr-tp4304756p4304879.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>


Re: Keeping faster and slower solr slaves alined with the same index version

2016-11-07 Thread Erick Erickson
Not that I know of. Can you session lock users to a particular region?

Best,
Erick

On Sun, Nov 6, 2016 at 7:49 PM, Csongor Gyuricza
 wrote:
> We have the following high-level solr setup:
>
> region a) 1 solr master + 3 slaves
> region b) 1 solr repeater (pointing to master in region a) + 3 slaves
>
> In region (a) Replication takes about 2 min from the master to the 3
> slaves. Due to our network topology, replication from the master to the
> repeater takes about 15 min after which, it takes another 2 min for the
> replication to occur between the repeater and the slaves in region (b), so
> the slaves in region (b) are always 15 min behind the slaves in region (a)
> which is a problem because all slaves are behind a latency-based route53
> record. Clients are noticing the difference because they are getting
> inconsistent data during those 15 min.
>
> I would like to solve this inconsistency. Is there a way to make the faster
> slaves in region (a) wait for all slaves in region (b) to complete
> replication and then have all 6 slaves switch to the new index
> simultaneously? if not, what is the alternative solution to this problem?
>
> - Csongor
>
> Note: We are on solr 3.5 (old, yes I know...)


Re: Sort by date? (solr.DateRangeField)

2016-11-07 Thread Erick Erickson
My guess is that it's this: multiValued="true"

Most sorting doesn't work on mutivalued fields as it's ambiguous what
sorting means; which value should be used? This isn't a very helpful
stack trace if that's the issue though I'll admit. There are some
JIRAs out there to allow sorting on, say, the min or max value here
but they're not in place yet..

May be totally wrong, but that's the first thing I'd look at. Come to
think I'm not entirely sure a dateRangeField is sortable for that
matter, haven't tried it personally.

BTW, I'd also define docValues for a field if I intended to sort on it.

Best,
Erick



On Mon, Nov 7, 2016 at 4:13 AM, Georgios Petasis
 wrote:
> Dear all,
>
> I have defined a field "date_range" as:
>  indexed="true"/>
>
> The field works (and I can perform range queries for these dates). but I
> have not found a way to sort
> results based on this field. I have tried with the dist(), ms() functions,
> to use the boost plugin, etc. and everything fails.
> Either with an error message, like:
>
> fl=startDate&q={!boost+b=$dateboost+v=$qq}&dateboost=recip(ms(NOW,startDate),3.16e-11,1,1)&qq=*
> A ValueSource isn't directly available from this field. Instead try a query
> using the distance as the score.
>
> or a stack trace:
> fl=startDate&q=*&sort="ms(startDate)"+asc"
>java.lang.UnsupportedOperationException
> at
> org.apache.lucene.queries.function.FunctionValues.doubleVal(FunctionValues.java:47)
> at
> org.apache.lucene.queries.function.ValueSource$ValueSourceComparator.copy(ValueSource.java:153)
> at
> org.apache.lucene.search.TopFieldCollector$SimpleFieldCollector$1.collect(TopFieldCollector.java:206)
> at
> org.apache.lucene.search.Weight$DefaultBulkScorer.scoreAll(Weight.java:221)
> at
> org.apache.lucene.search.Weight$DefaultBulkScorer.score(Weight.java:172)
> at org.apache.lucene.search.BulkScorer.score(BulkScorer.java:39)
> at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:669)
> at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:473)
> at
> org.apache.solr.search.SolrIndexSearcher.buildAndRunCollectorChain(SolrIndexSearcher.java:211)
> at
> org.apache.solr.search.SolrIndexSearcher.getDocListNC(SolrIndexSearcher.java:1765)
> at
> org.apache.solr.search.SolrIndexSearcher.getDocListC(SolrIndexSearcher.java:1582)
> at
> org.apache.solr.search.SolrIndexSearcher.search(SolrIndexSearcher.java:581)
> at
> org.apache.solr.handler.component.QueryComponent.process(QueryComponent.java:528)
> at
> org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:295)
> 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.s

Re: edismax, phrase field gets ignored for keyword tokenizer

2016-11-07 Thread Vincenzo D'Amore
If you don't want partial matches with edismax you should always use
StandardTokenizerFactory and play with mm parameter.

On Mon, Nov 7, 2016 at 4:50 PM, Stefan Matheis 
wrote:

> Vincenzo,
>
> thanks for the response - i know that only the Keyword Tokenizer by
> itself does not do anything. as pointed at the end of the initial
> mail, i’m applying a pattern replace for everything non-numeric to
> make it actually useful.
>
> and especially because of the tokenization based on whitespaces i’d
> like to use the very same field once again as phrase field to around
> this issue. Shawn mentioned in #solr in the meantime that there is
> SOLR-9185 which is similar and would be helpful, but currently very
> very in-the-works.
>
> Standard Tokenizer you’ve mentioned does split on whitespace - as
> edismax does by default in the first place. so i’m not sure how that
> would help? For now, i don’t want to have partial matches on phone
> numbers .. at least not yet.
>
> -Stefan
>
>
> On November 7, 2016 at 4:41:50 PM, Vincenzo D'Amore (v.dam...@gmail.com)
> wrote:
> > Hi Stefan,
> >
> > I think the problem is solr.KeywordTokenizerFactory.
> > This tokeniser does not make any tokenisation to the string, it returns
> > exactly what you have.
> >
> > '+49 1234 12345678' -> '+49 1234 12345678'
> >
> > On the other hand, using edismax you are looking for '+49', '1234' and
> > '12345678' and none of these keywords match your phone_number field.
> >
> > Try using a different tokenizer like solr.StandardTokenizerFactory, this
> > should change your results.
> >
> > Bests,
> > Vincenzo
> >
> > On Mon, Nov 7, 2016 at 4:05 PM, Stefan Matheis
> > wrote:
> >
> > > I’m guessing that i’m missing something obvious here - so feel free to
> > > ask for more details and as well point out other directions i should
> > > following.
> > >
> > > the problem goes as follows: the input in one case might be a phone
> > > number (like +49 1234 12345678), since we’re using edismax the parts
> > > gets split on whitespaces - which is fine. bringing the same field
> > > (based on TextField) to the party (using qf) doesn’t change a thing.
> > >
> > > > responseHeader:
> > > > params:
> > > > q: '+49 1234 12345678'
> > > > defType: edismax
> > > > qf: person_mobile
> > > > pf: person_mobile^5
> > > > debug:
> > > > rawquerystring: '+49 1234 12345678'
> > > > querystring: '+49 1234 12345678'
> > > > parsedquery: '(+(+DisjunctionMaxQuery((person_mobile:49))
> > > DisjunctionMaxQuery((person_mobile:1234)) DisjunctionMaxQuery((person_
> mobile:12345678)))
> > > ())/no_coord'
> > > > parsedquery_toString: '+(+(person_mobile:49) (person_mobile:1234)
> > > (person_mobile:12345678)) ()’
> > >
> > > but .. as far as i was able to reduce the culprit, that only happens
> > > when i’m using solr.KeywordTokenizerFactory . as soon as i’m changing
> > > that to solr.StandardTokenizerFactory the phrase query appears as
> > > expected:
> > >
> > > > responseHeader:
> > > > params:
> > > > q: '+49 1234 12345678'
> > > > defType: edismax
> > > > qf: person_mobile
> > > > pf: person_mobile^5
> > > > debug:
> > > > rawquerystring: '+49 1234 12345678'
> > > > querystring: '+49 1234 12345678'
> > > > parsedquery: '(+(+DisjunctionMaxQuery((person_mobile:49))
> > > DisjunctionMaxQuery((person_mobile:1234)) DisjunctionMaxQuery((person_
> mobile:12345678)))
> > > DisjunctionMaxQuery(((person_mobile:"49 1234
> 12345678")^5.0)))/no_coord'
> > > > parsedquery_toString: '+(+(person_mobile:49) (person_mobile:1234)
> > > (person_mobile:12345678)) ((person_mobile:"49 1234 12345678")^5.0)’
> > >
> > > removing the + at the beginning, doesn’t make a difference either
> > > (just mentioning since tokee already asked this on #solr, where i’ve
> > > brought up the question earlier)
> > >
> > > it’s absolutely possible i’m focusing on a very wrong assumption - but
> > > since switching the tokenizer does result in such a rather large
> > > behaviour change, i think something is spooky here.
> > >
> > > i’ve read older issues and posts from the list, some of them pointed
> > > out that it might be a optimization that edismax brings to the table -
> > > i didn’t find anything specific about that.
> > >
> > > oh, and btw: if that would be working - my idea is to drop out
> > > everything for a given phrase that is not a number, to match the phone
> > > number, like this:
> > >
> > > >
> > > >
> > > >
> > > > > > replacement=""/>
> > > >
> > > >
> > >
> > > any thoughts? or wild guesses?
> > >
> > > Thanks Stefan
> > >
> >
> >
> >
> > --
> > Vincenzo D'Amore
> > email: v.dam...@gmail.com
> > skype: free.dev
> > mobile: +39 349 8513251
> >
>



-- 
Vincenzo D'Amore
email: v.dam...@gmail.com
skype: free.dev
mobile: +39 349 8513251


Re: edismax, phrase field gets ignored for keyword tokenizer

2016-11-07 Thread Stefan Matheis
Vincenzo,

thanks for the response - i know that only the Keyword Tokenizer by
itself does not do anything. as pointed at the end of the initial
mail, i’m applying a pattern replace for everything non-numeric to
make it actually useful.

and especially because of the tokenization based on whitespaces i’d
like to use the very same field once again as phrase field to around
this issue. Shawn mentioned in #solr in the meantime that there is
SOLR-9185 which is similar and would be helpful, but currently very
very in-the-works.

Standard Tokenizer you’ve mentioned does split on whitespace - as
edismax does by default in the first place. so i’m not sure how that
would help? For now, i don’t want to have partial matches on phone
numbers .. at least not yet.

-Stefan


On November 7, 2016 at 4:41:50 PM, Vincenzo D'Amore (v.dam...@gmail.com) wrote:
> Hi Stefan,
>
> I think the problem is solr.KeywordTokenizerFactory.
> This tokeniser does not make any tokenisation to the string, it returns
> exactly what you have.
>
> '+49 1234 12345678' -> '+49 1234 12345678'
>
> On the other hand, using edismax you are looking for '+49', '1234' and
> '12345678' and none of these keywords match your phone_number field.
>
> Try using a different tokenizer like solr.StandardTokenizerFactory, this
> should change your results.
>
> Bests,
> Vincenzo
>
> On Mon, Nov 7, 2016 at 4:05 PM, Stefan Matheis
> wrote:
>
> > I’m guessing that i’m missing something obvious here - so feel free to
> > ask for more details and as well point out other directions i should
> > following.
> >
> > the problem goes as follows: the input in one case might be a phone
> > number (like +49 1234 12345678), since we’re using edismax the parts
> > gets split on whitespaces - which is fine. bringing the same field
> > (based on TextField) to the party (using qf) doesn’t change a thing.
> >
> > > responseHeader:
> > > params:
> > > q: '+49 1234 12345678'
> > > defType: edismax
> > > qf: person_mobile
> > > pf: person_mobile^5
> > > debug:
> > > rawquerystring: '+49 1234 12345678'
> > > querystring: '+49 1234 12345678'
> > > parsedquery: '(+(+DisjunctionMaxQuery((person_mobile:49))
> > DisjunctionMaxQuery((person_mobile:1234)) 
> > DisjunctionMaxQuery((person_mobile:12345678)))
> > ())/no_coord'
> > > parsedquery_toString: '+(+(person_mobile:49) (person_mobile:1234)
> > (person_mobile:12345678)) ()’
> >
> > but .. as far as i was able to reduce the culprit, that only happens
> > when i’m using solr.KeywordTokenizerFactory . as soon as i’m changing
> > that to solr.StandardTokenizerFactory the phrase query appears as
> > expected:
> >
> > > responseHeader:
> > > params:
> > > q: '+49 1234 12345678'
> > > defType: edismax
> > > qf: person_mobile
> > > pf: person_mobile^5
> > > debug:
> > > rawquerystring: '+49 1234 12345678'
> > > querystring: '+49 1234 12345678'
> > > parsedquery: '(+(+DisjunctionMaxQuery((person_mobile:49))
> > DisjunctionMaxQuery((person_mobile:1234)) 
> > DisjunctionMaxQuery((person_mobile:12345678)))
> > DisjunctionMaxQuery(((person_mobile:"49 1234 12345678")^5.0)))/no_coord'
> > > parsedquery_toString: '+(+(person_mobile:49) (person_mobile:1234)
> > (person_mobile:12345678)) ((person_mobile:"49 1234 12345678")^5.0)’
> >
> > removing the + at the beginning, doesn’t make a difference either
> > (just mentioning since tokee already asked this on #solr, where i’ve
> > brought up the question earlier)
> >
> > it’s absolutely possible i’m focusing on a very wrong assumption - but
> > since switching the tokenizer does result in such a rather large
> > behaviour change, i think something is spooky here.
> >
> > i’ve read older issues and posts from the list, some of them pointed
> > out that it might be a optimization that edismax brings to the table -
> > i didn’t find anything specific about that.
> >
> > oh, and btw: if that would be working - my idea is to drop out
> > everything for a given phrase that is not a number, to match the phone
> > number, like this:
> >
> > >
> > >
> > >
> > > > > replacement=""/>
> > >
> > >
> >
> > any thoughts? or wild guesses?
> >
> > Thanks Stefan
> >
>
>
>
> --
> Vincenzo D'Amore
> email: v.dam...@gmail.com
> skype: free.dev
> mobile: +39 349 8513251
>


Re: edismax, phrase field gets ignored for keyword tokenizer

2016-11-07 Thread Vincenzo D'Amore
Hi Stefan,

I think the problem is solr.KeywordTokenizerFactory.
This tokeniser does not make any tokenisation to the string, it returns
exactly what you have.

'+49 1234 12345678' -> '+49 1234 12345678'

On the other hand, using edismax you are looking for '+49', '1234' and
'12345678' and none of these keywords match your phone_number field.

Try using a different tokenizer like solr.StandardTokenizerFactory, this
should change your results.

Bests,
Vincenzo

On Mon, Nov 7, 2016 at 4:05 PM, Stefan Matheis 
wrote:

> I’m guessing that i’m missing something obvious here - so feel free to
> ask for more details and as well point out other directions i should
> following.
>
> the problem goes as follows: the input in one case might be a phone
> number (like +49 1234 12345678), since we’re using edismax the parts
> gets split on whitespaces - which is fine. bringing the same field
> (based on TextField) to the party (using qf) doesn’t change a thing.
>
> > responseHeader:
> > params:
> > q: '+49 1234 12345678'
> > defType: edismax
> > qf: person_mobile
> > pf: person_mobile^5
> > debug:
> > rawquerystring: '+49 1234 12345678'
> > querystring: '+49 1234 12345678'
> > parsedquery: '(+(+DisjunctionMaxQuery((person_mobile:49))
> DisjunctionMaxQuery((person_mobile:1234)) 
> DisjunctionMaxQuery((person_mobile:12345678)))
> ())/no_coord'
> > parsedquery_toString: '+(+(person_mobile:49) (person_mobile:1234)
> (person_mobile:12345678)) ()’
>
> but .. as far as i was able to reduce the culprit, that only happens
> when i’m using solr.KeywordTokenizerFactory . as soon as i’m changing
> that to solr.StandardTokenizerFactory the phrase query appears as
> expected:
>
> > responseHeader:
> > params:
> > q: '+49 1234 12345678'
> > defType: edismax
> > qf: person_mobile
> > pf: person_mobile^5
> > debug:
> > rawquerystring: '+49 1234 12345678'
> > querystring: '+49 1234 12345678'
> > parsedquery: '(+(+DisjunctionMaxQuery((person_mobile:49))
> DisjunctionMaxQuery((person_mobile:1234)) 
> DisjunctionMaxQuery((person_mobile:12345678)))
> DisjunctionMaxQuery(((person_mobile:"49 1234 12345678")^5.0)))/no_coord'
> > parsedquery_toString: '+(+(person_mobile:49) (person_mobile:1234)
> (person_mobile:12345678)) ((person_mobile:"49 1234 12345678")^5.0)’
>
> removing the + at the beginning, doesn’t make a difference either
> (just mentioning since tokee already asked this on #solr, where i’ve
> brought up the question earlier)
>
> it’s absolutely possible i’m focusing on a very wrong assumption - but
> since switching the tokenizer does result in such a rather large
> behaviour change, i think something is spooky here.
>
> i’ve read older issues and posts from the list, some of them pointed
> out that it might be a optimization that edismax brings to the table -
> i didn’t find anything specific about that.
>
> oh, and btw: if that would be working - my idea is to drop out
> everything for a given phrase that is not a number, to match the phone
> number, like this:
>
> > 
> >   
> > 
> >  replacement=""/>
> >   
> > 
>
> any thoughts? or wild guesses?
>
> Thanks Stefan
>



-- 
Vincenzo D'Amore
email: v.dam...@gmail.com
skype: free.dev
mobile: +39 349 8513251


edismax, phrase field gets ignored for keyword tokenizer

2016-11-07 Thread Stefan Matheis
I’m guessing that i’m missing something obvious here - so feel free to
ask for more details and as well point out other directions i should
following.

the problem goes as follows: the input in one case might be a phone
number (like +49 1234 12345678), since we’re using edismax the parts
gets split on whitespaces - which is fine. bringing the same field
(based on TextField) to the party (using qf) doesn’t change a thing.

> responseHeader:
>     params:
>         q: '+49 1234 12345678'
>         defType: edismax
>         qf: person_mobile
>         pf: person_mobile^5
> debug:
>     rawquerystring: '+49 1234 12345678'
>     querystring: '+49 1234 12345678'
>     parsedquery: '(+(+DisjunctionMaxQuery((person_mobile:49)) 
>DisjunctionMaxQuery((person_mobile:1234)) 
>DisjunctionMaxQuery((person_mobile:12345678))) ())/no_coord'
>     parsedquery_toString: '+(+(person_mobile:49) (person_mobile:1234) 
>(person_mobile:12345678)) ()’

but .. as far as i was able to reduce the culprit, that only happens
when i’m using solr.KeywordTokenizerFactory . as soon as i’m changing
that to solr.StandardTokenizerFactory the phrase query appears as
expected:

> responseHeader:
>     params:
>         q: '+49 1234 12345678'
>         defType: edismax
>         qf: person_mobile
>         pf: person_mobile^5
> debug:
>     rawquerystring: '+49 1234 12345678'
>     querystring: '+49 1234 12345678'
>     parsedquery: '(+(+DisjunctionMaxQuery((person_mobile:49)) 
>DisjunctionMaxQuery((person_mobile:1234)) 
>DisjunctionMaxQuery((person_mobile:12345678))) 
>DisjunctionMaxQuery(((person_mobile:"49 1234 12345678")^5.0)))/no_coord'
>     parsedquery_toString: '+(+(person_mobile:49) (person_mobile:1234) 
>(person_mobile:12345678)) ((person_mobile:"49 1234 12345678")^5.0)’

removing the + at the beginning, doesn’t make a difference either
(just mentioning since tokee already asked this on #solr, where i’ve
brought up the question earlier)

it’s absolutely possible i’m focusing on a very wrong assumption - but
since switching the tokenizer does result in such a rather large
behaviour change, i think something is spooky here.

i’ve read older issues and posts from the list, some of them pointed
out that it might be a optimization that edismax brings to the table -
i didn’t find anything specific about that.

oh, and btw: if that would be working - my idea is to drop out
everything for a given phrase that is not a number, to match the phone
number, like this:

> 
>   
>     
>      replacement=""/>
>   
> 

any thoughts? or wild guesses?

Thanks Stefan


Re: Performance Tuning in Solr

2016-11-07 Thread Shawn Heisey
On 11/7/2016 6:27 AM, Mugeesh Husain wrote:
> For the large amount of data set, going to implement many shard and
> many node. I am unaware of performance tuning in solr ? how people use
> or check solr performance ? Is there any open source tool or i should
> create my own for this and how ? 

See this article:

https://lucidworks.com/blog/sizing-hardware-in-the-abstract-why-we-dont-have-a-definitive-answer/

Pretty much the same thing applies to performance measuring and tuning. 
There are no easy answers.  Solr does collect and display some
statistics on the QTime for requests on each handler, but this is only
one metric, others may need attention.

What you consider to be large may be very small to someone else, and
providing generic answers is nearly impossible.

For the most part, measuring consists of setting up the system and
hitting it with a normal query load.  If the handler statistics look
acceptable and queries complete in a satisfactory amount of time, you're
good.

Most "tuning" of Solr consists of making sure there is enough memory for
good disk caching.  This is memory above and beyond the Java heap.  I've
collected my thoughts on this subject here:

https://wiki.apache.org/solr/SolrPerformanceProblems

For extreme scalability, sometimes adjusting the configuration (mostly
the operating system, but sometimes Solr) is necessary, but it is
generally well-tuned out of the box for most workloads.  It is difficult
to anticipate what problems you will run into on your particular system.

Thanks,
Shawn



Re: Custom .... - Web toolkit for developing Solr Client application

2016-11-07 Thread Shawn Heisey
On 11/7/2016 3:31 AM, tesm...@gmail.com wrote:
> Thanks all for providing help to my previous question. I make my question
> generic to make it more clear.
>
> I have developed index with Lucene/Solr and can search the indexed data
> using Solr 'browse'. This interface provides some of the functionality for
> my client application
>
> I do understand that it is not advisable to use this interface for a web
> site due to security concerns.
>
> My question is :
> Are there any web tool kits available for developing Solr based web client
> applications. I need the following features:
> 1) User authentication
> 2) Search from one or more fields
> 3) Search term highlighting
> 4) Graphical view of the search results (month wise popularity index of 

There are Solr clients available for many different programming
languages.  Only one of those clients (SolrJ, a client for Java) is
produced by the project, all others are third-party projects.  SolrJ is
actually more than just a client -- it's part of Solr itself.

Here's a list of clients, probably not complete:

https://wiki.apache.org/solr/IntegratingSolr

These clients do not concern themselves with creating web pages, but
there are other libraries for the listed programming languages which ARE
designed to make creating web pages easier.  You can combine a Solr
client with one or more of those libraries, and write a complete
application.  You also have the option of just incorporating a client
for HTTP, and building all of the HTTP calls to Solr yourself.  That is
a huge amount of work, and not something that I recommend.

If you need assistance building your application and are willing to pay
for that assistance, you can find quite a lot of resources with a google
search for "solr consulting", and the Solr wiki has a list of companies
that provide support for Solr.  Some of these companies also do consulting:

https://wiki.apache.org/solr/Support?

There are many open source examples of code that interfaces to Solr and
creates a web page.  Solr support is available for lots of well-known
web products, like WordPress, Drupal, and so on.

Thanks,
Shawn



Re: Apache Solr Question

2016-11-07 Thread Alexandre Rafalovitch
Solr ships with 10 different examples. Most of them work (ignore DIH -
RSS one and maybe DIH - email one).

Try doing those and understanding them, then you will have better
understanding of what's possible and also exactly where you want to
go.

Regards,
   Alex.
P.s. This will help if you are lost:
http://blog.outerthoughts.com/2015/11/oh-solr-home-where-art-thou/
P.p.s. Also see example reading group in the signature.

Solr Example reading group is starting November 2016, join us at
http://j.mp/SolrERG
Newsletter and resources for Solr beginners and intermediates:
http://www.solr-start.com/


On 7 November 2016 at 20:51, Chien Nguyen  wrote:
> Hi. Everyone!
> I've just learned about Apache Solr. I want to create some examples to
> connect with Solr. Who can help me? Coz i searched and followed some posts
> but it is always wrong.
> Tks!
>
>
>
> --
> View this message in context: 
> http://lucene.472066.n3.nabble.com/Apache-Solr-Question-tp4304826.html
> Sent from the Solr - User mailing list archive at Nabble.com.


Re: load balancer for solr

2016-11-07 Thread Mugeesh Husain
Thanks Shawn Heisey,Its seems impression, let me try it on POC.



--
View this message in context: 
http://lucene.472066.n3.nabble.com/load-balancer-for-solr-tp4304756p4304879.html
Sent from the Solr - User mailing list archive at Nabble.com.


Performance Tuning in Solr

2016-11-07 Thread Mugeesh Husain
For the large amount of data set, going to implement many shard and many
node.

I am unaware of performance tuning in solr ? how people use or check solr
performance ?

Is there any open source tool   or i should create my own for this and how ?


Thanks
Mugeesh




--
View this message in context: 
http://lucene.472066.n3.nabble.com/Performance-Tuning-in-Solr-tp4304878.html
Sent from the Solr - User mailing list archive at Nabble.com.


Could you please add me to this user group

2016-11-07 Thread Raj hadoop
Thanks,
Raj


Sort by date? (solr.DateRangeField)

2016-11-07 Thread Georgios Petasis

Dear all,

I have defined a field "date_range" as:
multiValued="true" indexed="true"/>


The field works (and I can perform range queries for these dates). but I 
have not found a way to sort
results based on this field. I have tried with the dist(), ms() 
functions, to use the boost plugin, etc. and everything fails.

Either with an error message, like:

fl=startDate&q={!boost+b=$dateboost+v=$qq}&dateboost=recip(ms(NOW,startDate),3.16e-11,1,1)&qq=*
A ValueSource isn't directly available from this field. Instead try a 
query using the distance as the score.


or a stack trace:
fl=startDate&q=*&sort="ms(startDate)"+asc"
   java.lang.UnsupportedOperationException
at 
org.apache.lucene.queries.function.FunctionValues.doubleVal(FunctionValues.java:47)
at 
org.apache.lucene.queries.function.ValueSource$ValueSourceComparator.copy(ValueSource.java:153)
at 
org.apache.lucene.search.TopFieldCollector$SimpleFieldCollector$1.collect(TopFieldCollector.java:206)
at 
org.apache.lucene.search.Weight$DefaultBulkScorer.scoreAll(Weight.java:221)
at 
org.apache.lucene.search.Weight$DefaultBulkScorer.score(Weight.java:172)

at org.apache.lucene.search.BulkScorer.score(BulkScorer.java:39)
at 
org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:669)
at 
org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:473)
at 
org.apache.solr.search.SolrIndexSearcher.buildAndRunCollectorChain(SolrIndexSearcher.java:211)
at 
org.apache.solr.search.SolrIndexSearcher.getDocListNC(SolrIndexSearcher.java:1765)
at 
org.apache.solr.search.SolrIndexSearcher.getDocListC(SolrIndexSearcher.java:1582)
at 
org.apache.solr.search.SolrIndexSearcher.search(SolrIndexSearcher.java:581)
at 
org.apache.solr.handler.component.QueryComponent.process(QueryComponent.java:528)
at 
org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:295)
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.lang.Thread.run(Thread.java:745)


 I am using Solr 6.2.1.

Regards,
George


Sort by date? (solr.DateRangeField)

2016-11-07 Thread Georgios Petasis

Dear all,

I have defined a field "date_range" as:
multiValued="true" indexed="true"/>


The field works (and I can perform range queries for these dates). but I 
have not found a way to sort
results based on this field. I have tried with the dist(), ms() 
functions, to use the boost plugin, etc. and everything fails.

Either with an error message, like:

fl=startDate&q={!boost+b=$dateboost+v=$qq}&dateboost=recip(ms(NOW,startDate),3.16e-11,1,1)&qq=*
A ValueSource isn't directly available from this field. Instead try a 
query using the distance as the score.


or a stack trace:
fl=startDate&q=*&sort="ms(startDate)"+asc"
   java.lang.UnsupportedOperationException
at 
org.apache.lucene.queries.function.FunctionValues.doubleVal(FunctionValues.java:47)
at 
org.apache.lucene.queries.function.ValueSource$ValueSourceComparator.copy(ValueSource.java:153)
at 
org.apache.lucene.search.TopFieldCollector$SimpleFieldCollector$1.collect(TopFieldCollector.java:206)
at 
org.apache.lucene.search.Weight$DefaultBulkScorer.scoreAll(Weight.java:221)
at 
org.apache.lucene.search.Weight$DefaultBulkScorer.score(Weight.java:172)

at org.apache.lucene.search.BulkScorer.score(BulkScorer.java:39)
at 
org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:669)
at 
org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:473)
at 
org.apache.solr.search.SolrIndexSearcher.buildAndRunCollectorChain(SolrIndexSearcher.java:211)
at 
org.apache.solr.search.SolrIndexSearcher.getDocListNC(SolrIndexSearcher.java:1765)
at 
org.apache.solr.search.SolrIndexSearcher.getDocListC(SolrIndexSearcher.java:1582)
at 
org.apache.solr.search.SolrIndexSearcher.search(SolrIndexSearcher.java:581)
at 
org.apache.solr.handler.component.QueryComponent.process(QueryComponent.java:528)
at 
org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:295)
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.lang.Thread.run(Thread.java:745)


 I am using Solr 6.2.1.

Regards,
George


Re: confirm subscribe to solr-user@lucene.apache.org

2016-11-07 Thread Georgios Petasis

On 7/11/2016 13:50, solr-user-h...@lucene.apache.org wrote:

Hi! This is the ezmlm program. I'm managing the
solr-user@lucene.apache.org mailing list.

I'm working for my owner, who can be reached
at solr-user-ow...@lucene.apache.org.

To confirm that you would like

petas...@yahoo.gr

added to the solr-user mailing list, please send
a short reply to this address:


solr-user-sc.1478519438.cplbgddohdekmdpnkjoa-petasisg=yahoo...@lucene.apache.org

Usually, this happens when you just hit the "reply" button.
If this does not work, simply copy the address and paste it into
the "To:" field of a new message.

or click here:

mailto:solr-user-sc.1478519438.cplbgddohdekmdpnkjoa-petasisg=yahoo...@lucene.apache.org

This confirmation serves two purposes. First, it verifies that I am able
to get mail through to you. Second, it protects you in case someone
forges a subscription request in your name.

Please note that ALL Apache dev- and user- mailing lists are publicly
archived.  Do familiarize yourself with Apache's public archive policy at

 http://www.apache.org/foundation/public-archives.html

prior to subscribing and posting messages to solr-user@lucene.apache.org.
If you're not sure whether or not the policy applies to this mailing list,
assume it does unless the list name contains the word "private" in it.

Some mail programs are broken and cannot handle long addresses. If you
cannot reply to this request, instead send a message to
 and put the
entire address listed above into the "Subject:" line.


--- Administrative commands for the solr-user list ---

I can handle administrative requests automatically. Please
do not send them to the list address! Instead, send
your message to the correct command address:

To subscribe to the list, send a message to:


To remove your address from the list, send a message to:


Send mail to the following for info and FAQ for this list:



Similar addresses exist for the digest list:



To get messages 123 through 145 (a maximum of 100 per request), mail:


To get an index with subject and author for messages 123-456 , mail:


They are always returned as sets of 100, max 2000 per request,
so you'll actually get 100-499.

To receive all messages with the same subject as message 12345,
send a short message to:


The messages should contain one line or word of text to avoid being
treated as sp@m, but I will ignore their content.
Only the ADDRESS you send to is important.

You can start a subscription for an alternate address,
for example "john@host.domain", just add a hyphen and your
address (with '=' instead of '@') after the command word:


To stop subscription for this address, mail:


In both cases, I'll send a confirmation message to that address. When
you receive it, simply reply to it to complete your subscription.

If despite following these instructions, you do not get the
desired results, please contact my owner at
solr-user-ow...@lucene.apache.org. Please be patient, my owner is a
lot slower than I am ;-)

--- Enclosed is a copy of the request I received.

Return-Path: 
Received: (qmail 23747 invoked by uid 99); 7 Nov 2016 11:50:38 -
Received: from pnap-us-west-generic-nat.apache.org (HELO 
spamd4-us-west.apache.org) (209.188.14.142)
 by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 07 Nov 2016 11:50:38 +
Received: from localhost (localhost [127.0.0.1])
by spamd4-us-west.apache.org (ASF Mail Server at 
spamd4-us-west.apache.org) with ESMTP id CDB2DC0C69
for ; Mon,  7 Nov 2016 11:50:37 
+ (UTC)
X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org
X-Spam-Flag: NO
X-Spam-Score: 5.264
X-Spam-Level: *
X-Spam-Status: No, score=5.264 tagged_above=-999 required=6.31
tests=[DKIM_ADSP_CUSTOM_MED=0.001, EMPTY_MESSAGE=2.344,
MISSING_SUBJECT=1.767, NML_ADSP_CUSTOM_MED=1.2,
RCVD_IN_DNSWL_LOW=-0.7, SPF_NEUTRAL=0.652] autolearn=disabled
Received: from mx1-lw-us.apache.org ([10.40.0.8])
by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, 
port 10024)
with ESMTP id 3S89B2JGFNAl
for ;
Mon,  7 Nov 2016 11:50:34 + (UTC)
Received: from chimaera.otenet.gr (smtp-out32.otenet.gr [83.235.69.32])
by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with 
ESMTPS id DF4FB5FD29
for ; Mon,  7 Nov 2016 11:50:33 
+ (UTC)
Received: from [192.168.1.10] (athedsl-109785.home.otenet.gr [85.75.4.120])
by chimaera.otenet.gr (ESMTP) with ESMTPSA
for ; Mon,  7 Nov 2016 13:50:21 
+0200 (EET)
To: solr-user-subscr...@lucene.apache.org
From: George Petasis 
Message-ID: 
Date: Mon, 7 Nov 2016 13:50:15 +0200
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101
  Thunderbird/45.4.0
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit






Re: Custom .... - Web toolkit for developing Solr Client application

2016-11-07 Thread tesm...@gmail.com
Hi,

Thanks all for providing help to my previous question. I make my question
generic to make it more clear.

I have developed index with Lucene/Solr and can search the indexed data
using Solr 'browse'. This interface provides some of the functionality for
my client application

I do understand that it is not advisable to use this interface for a web
site due to security concerns.

My question is :
Are there any web tool kits available for developing Solr based web client
applications. I need the following features:
1) User authentication
2) Search from one or more fields
3) Search term highlighting
4) Graphical view of the search results (month wise popularity index of a
hotel or alike)
5) Grouping similar search results.




Regards,


On Fri, Nov 4, 2016 at 8:53 PM, Erik Hatcher  wrote:

> What kind of graphical format?
>
> > On Nov 4, 2016, at 14:01, "tesm...@gmail.com"  wrote:
> >
> > Hi,
> >
> > My search query comprises of more than one fields like search string,
> date
> > field and a one optional field).
> >
> > I need to represent these on the web interface to the users.
> >
> > Secondly, I need to represent the search data in graphical format.
> >
> > Is there some Solr web client that provides the above features or Is
> there
> > a way to modify the default Solr Browse interface and add above options?
> >
> >
> >
> >
> >
> > Regards,
>


Re: Custom user web interface for Solr

2016-11-07 Thread tesm...@gmail.com
Dear Erik,

Thanks for your reply.

A month wise bar graph of the popularity of a hotel from search results.
These graphs will be generated from the search results and will be
displayed on an on-demand basis.

Regards,


On Fri, Nov 4, 2016 at 8:53 PM, Erik Hatcher  wrote:

> What kind of graphical format?
>
> > On Nov 4, 2016, at 14:01, "tesm...@gmail.com"  wrote:
> >
> > Hi,
> >
> > My search query comprises of more than one fields like search string,
> date
> > field and a one optional field).
> >
> > I need to represent these on the web interface to the users.
> >
> > Secondly, I need to represent the search data in graphical format.
> >
> > Is there some Solr web client that provides the above features or Is
> there
> > a way to modify the default Solr Browse interface and add above options?
> >
> >
> >
> >
> >
> > Regards,
>


Apache Solr Question

2016-11-07 Thread Chien Nguyen
Hi. Everyone!
I've just learned about Apache Solr. I want to create some examples to
connect with Solr. Who can help me? Coz i searched and followed some posts
but it is always wrong. 
Tks!



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Apache-Solr-Question-tp4304826.html
Sent from the Solr - User mailing list archive at Nabble.com.