Re: Solr Analyzer for Vietnamese

2017-07-13 Thread Đạt Cao Mạnh
Sorry Erick, I had a draft but forgot to press send button.

I took a look at the Analyzer and It seems take some time to update it, But
I'm going to spend my weekends on update the repo.

Thanks!

On Thu, Jul 13, 2017 at 7:00 PM Jan Høydahl  wrote:

> Cao, did you see this email from Eirik?
>
> --
> Jan Høydahl, search solution architect
> Cominvent AS - www.cominvent.com
>
> > 1. jun. 2017 kl. 13.33 skrev Eirik Hungnes :
> >
> > Thanks Erick,
> >
> > Dat:
> >
> > Do you have more info about the subject?
> >
> > 2017-05-22 17:08 GMT+02:00 Erick Erickson :
> >
> >> Eirik:
> >>
> >> That code is 4 years old and for Lucene 4. I doubt it applies cleanly
> >> to the current code base, but feel free to give it a try but it's not
> >> guaranteed.
> >>
> >> I know of no other Vietnamese analyzers available.
> >>
> >> Dat is active in the community, don't know whether he has plans to
> >> update/commit that bit of code.
> >>
> >> Best,
> >> Erick
> >>
> >> On Mon, May 22, 2017 at 12:25 AM, Eirik Hungnes
> >>  wrote:
> >>> Hi,
> >>>
> >>> There doesn't seem to be any Tokenizer / Analyzer for Vietnamese built
> in
> >>> to Lucene at the moment. Does anyone know if something like this exists
> >>> today or is planned for? We found this
> >>> https://github.com/CaoManhDat/VNAnalyzer made by Cao Mahn Dat, but not
> >> sure
> >>> if it's up to date. Any info highly appreciated!
> >>>
> >>> Thanks,
> >>>
> >>> Eirik
> >>
> >
> >
> >
> > --
> > Best regards,
> >
> > Eirik Hungnes
> > CTO
> > Rubrikk Group AS
> >
> > Cell: +4797027732 <+47%20970%2027%20732>
> > skypeid: blindkorn44
>
>


Issue: Hit Highlighting Working Inconsistently in Solr 6.6

2017-07-13 Thread Vikram Oberoi
Hi there,

I'm seeing inconsistent highlighting behavior using a default, fresh Solr
6.6 install and it's unclear to me why or how to go about debugging it.

Hit highlights either show entirely correct highlights or none at all when
there should be highlights.

   - Some queries show highlights out of the box, some do not.
  - e.g. "hello" yields no highlights, but "goodbye" correctly yields
  highlights
   - Some queries that do not show highlights suddenly work when specifying
   fields
  - e.g. "subject:hello" yields highlights, but "hello" does not
   - When queries that yield highlights and queries that do not are
   combined, only those that work are highlighted.
  - e.g. "hello goodbye" yields highlights correctly for "goodbye", but
  not for "hello"

I've thrown specific details and examples in a Gist here:

Full Gist: https://gist.github.com/voberoi/a7a8a679390fc4f27422e70600cfb338

   - Problem description:
  - https://gist.github.com/voberoi/a7a8a679390fc4f27422e70600cfb3
  38#file-problem-details-md
   - Solr install, my schema, solrconfig details:
  - https://gist.github.com/voberoi/a7a8a679390fc4f27422e70600cfb3
  38#file-solr-details-md

Does anyone here have any hypotheses for why this might be happening?

Thanks!
Vikram


Re: Solr Analyzer for Vietnamese

2017-07-13 Thread Ahmet Arslan

Hi Eirik,
I believe "icu tokenizer" does a decent job on text written in non-alphabets.
Ahmet

On Monday, May 22, 2017, 10:32:22 AM GMT+3, Eirik Hungnes 
 wrote:


Hi,

There doesn't seem to be any Tokenizer / Analyzer for Vietnamese built in
to Lucene at the moment. Does anyone know if something like this exists
today or is planned for? We found this
https://github.com/CaoManhDat/VNAnalyzer made by Cao Mahn Dat, but not sure
if it's up to date. Any info highly appreciated!

Thanks,

Eirik

RE: Need domain configuration assistance

2017-07-13 Thread Bertini, Vickie
Thanks to everyone who has responded. I will do some testing once the firewall 
port is adjusted.

-Original Message-
From: Shawn Heisey [mailto:apa...@elyograg.org] 
Sent: Thursday, July 13, 2017 3:07 PM
To: solr-user@lucene.apache.org
Subject: Re: Need domain configuration assistance

** STOP. THINK. External Email **

On 7/13/2017 11:23 AM, Bertini, Vickie wrote:
>
> I have installed Solr 6.5.1 as a service on our Windows Server 2012.
> It is up and running properly under localhost:8983, however, I have a 
> domain name I want to assign to it so our external content delivery 
> servers can reach it for our web search. However, I am very new to 
> Solr and mostly only familiar with IIS, not jetty, so is there 
> documentation on how I would configure solr to run on our new 
> domain/IP instead of localhost? Web searches up to this point have 
> been fairly unproductive and unhelpful.
>

The Jetty server that comes with Solr is configured to listen on all system 
network interfaces.  It is not restricted to localhost.

The operating system may be blocking external traffic.  Most operating systems 
have a built-in firewall that will block all external connections to Solr's 
listening port by default.  Windows has such a firewall.  Consult Microsoft 
documentation for how to configure their firewall.

Once you have external network access allowed, it's up to you to properly 
configure your DNS servers so the domain name resolves correctly.

Thanks,
Shawn



Re: Need domain configuration assistance

2017-07-13 Thread Shawn Heisey
On 7/13/2017 11:23 AM, Bertini, Vickie wrote:
>
> I have installed Solr 6.5.1 as a service on our Windows Server 2012.
> It is up and running properly under localhost:8983, however, I have a
> domain name I want to assign to it so our external content delivery
> servers can reach it for our web search. However, I am very new to
> Solr and mostly only familiar with IIS, not jetty, so is there
> documentation on how I would configure solr to run on our new
> domain/IP instead of localhost? Web searches up to this point have
> been fairly unproductive and unhelpful.
>

The Jetty server that comes with Solr is configured to listen on all
system network interfaces.  It is not restricted to localhost.

The operating system may be blocking external traffic.  Most operating
systems have a built-in firewall that will block all external
connections to Solr's listening port by default.  Windows has such a
firewall.  Consult Microsoft documentation for how to configure their
firewall.

Once you have external network access allowed, it's up to you to
properly configure your DNS servers so the domain name resolves correctly.

Thanks,
Shawn



Re: compiling Solr

2017-07-13 Thread Shawn Heisey
On 7/13/2017 2:16 PM, Steve Pruitt wrote:
> I have been following the instructions on the Solr Wiki for compiling Solr.  
> I started with the 6.6 source.  The only thing I did different was download 
> the src directly.  I did not use Subversion.
> I made through step 7 - Compile application with no problems.  However, the 
> dist folder contains newly build snapshot jars, but no war file.

As noted by Daniel on your other reply, that page is very out of date. 
This is more current:

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

There has been no war file in the dist directory since version 5.0.0,
and there has been no war file produced *at all* since version 5.3.0.

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

If you run "ant server", then you will get a runnable server.  Once
that's done, type "bin/solr start" or "bin\solr start" to start Solr,
depending on the operating system.

I agree with Daniel on another point:  If you aren't intending to
immediately jump into editing the source code, then you should download
the binary distribution, which is ready to run right away.

You can also run "ant package" to create your own local copy of the
binary distribution with a SNAPSHOT version number.

Thanks,
Shawn



Re: NullPointerException on openStreams

2017-07-13 Thread Joel Bernstein
If you can include the stack trace and version of Solr we can see what's
causing the exception.

Joel Bernstein
http://joelsolr.blogspot.com/

On Thu, Jul 13, 2017 at 4:33 PM, Joe Obernberger <
joseph.obernber...@gmail.com> wrote:

> Thanks for this.  I'm now trying to use stream for classify, but am
> getting an ArrayIndexOutOfBounds error on the stream.open().  I'm setting
> the streamFactory up, and including .withFunctionName("classify",
> ClassifyStream.class) - but is that class in orga.apache.solr.handler?
>
> -
> StringBuilder expression = new StringBuilder();
> solrCollection = getCollectionFromProfileBean(pBean);
> expression.append("classify(model(models,id=\"").append(pBea
> n.getModelID()).append("\",cacheMillis=5000),");
> expression.append("search(").append(solrCollection).append("
> ,q=\"DocumentId:").append(docID).append("\",");
> expression.append("fl=\"ClusterText,id\",sort=\"id
> asc\"),field=\"ClusterText\")");
> logger.info("Have classify expression:\n" +
> expression.toString() + "\n");
> params.set("expr", expression.toString());
> params.set("qt", "/stream");
> params.set("explain", "true");
> params.set("q", "*:*");
> params.set("fl", "id");
> params.set("sort", "id asc");
>
> context = new StreamContext();
> context.setSolrClientCache(StaticInfo.getSingleton(props).
> getClientCache());
> context.workerID = 0;
> context.numWorkers = 1;
> context.setModelCache(StaticInfo.getSingleton(props).getModelCache());
>
> streamFactory.withCollectionZkHost(solrCollection,
> props.getProperty("hbase.zookeeper.solr.quorum"))
> .withFunctionName("search", CloudSolrStream.class)
> .withFunctionName("facet", FacetStream.class)
> .withFunctionName("update", UpdateStream.class)
> .withFunctionName("jdbc", JDBCStream.class)
> .withFunctionName("topic", TopicStream.class)
> .withFunctionName("commit", CommitStream.class)
> // decorator streams
> .withFunctionName("merge", MergeStream.class)
> .withFunctionName("unique", UniqueStream.class)
> .withFunctionName("top", RankStream.class)
> .withFunctionName("reduce", ReducerStream.class)
> .withFunctionName("parallel", ParallelStream.class)
> .withFunctionName("rollup", RollupStream.class)
> .withFunctionName("stats", StatsStream.class)
> .withFunctionName("innerJoin", InnerJoinStream.class)
> .withFunctionName("leftOuterJoin",
> LeftOuterJoinStream.class)
> .withFunctionName("hashJoin", HashJoinStream.class)
> .withFunctionName("outerHashJoin",
> OuterHashJoinStream.class)
> .withFunctionName("intersect", IntersectStream.class)
> .withFunctionName("complement",
> ComplementStream.class)
> .withFunctionName(SORT, SortStream.class)
> .withFunctionName("train", TextLogitStream.class)
> .withFunctionName("features",
> FeaturesSelectionStream.class)
> .withFunctionName("daemon", DaemonStream.class)
> .withFunctionName("shortestPath",
> ShortestPathStream.class)
> .withFunctionName("gatherNodes",
> GatherNodesStream.class)
> .withFunctionName("nodes", GatherNodesStream.class)
> .withFunctionName("select", SelectStream.class)
> .withFunctionName("shortestPath",
> ShortestPathStream.class)
> .withFunctionName("gatherNodes",
> GatherNodesStream.class)
> .withFunctionName("nodes", GatherNodesStream.class)
> .withFunctionName("scoreNodes",
> ScoreNodesStream.class)
> .withFunctionName("model", ModelStream.class)
> .withFunctionName("classify", ClassifyStream.class)
> .withFunctionName("fetch", FetchStream.class)
> .withFunctionName("executor", ExecutorStream.class)
> .withFunctionName("null", NullStream.class)
> .withFunctionName("priority", PriorityStream.class)
> .withFunctionName("significantTerms",
> SignificantTermsStream.class)
> .withFunctionName("cartesianProduct",
> CartesianProductStream.class)
> .withFunctionName("shuffle", ShuffleStream.class)
> .withFunctionName("calc", CalculatorStream.class)
> .withFunctionName("eval", EvalStream.class)
> .withFunctionName("echo", EchoStream.class)
> .withFunctionName("cell",

Re: How to Debug Solr With Eclipse

2017-07-13 Thread Lars Karlsson
Another option that I normally find easier is attaching to existing Solr
instance and do remote debugging.
It require changing the JVM options and restarting Solr, then from eclipse
choose Remote Java Application.

On Thu, 13 Jul 2017 at 19:50, Rainer Gnan 
wrote:

> Hello community,
>
> my aim is to develop solr custom code (e.g. UpdateRequestProcessor)
> within Eclipse AND to test the code within a debuggable solr/lucene
> local instance - also within Eclipse.
> Searching the web led me to multiple instructions but for me no one
> works.
>
> The only relevant question I actually have to solve this problem is:
> Where can I download the source code for the version I want that
> includes the ANT build.xml for building an Eclipse-Project?
>
> The solr project page (http://archive.apache.org/dist/lucene/solr/)
> seems not to provide that.
>
> I appreciate any hint!
>
> Best regards
> Rainer
>
>


Re: compiling Solr

2017-07-13 Thread Daniel Collins
That page was last edited in 2014, things have moved on a little since then!
Solr doesn't produce a WAR file by default anymore, as running in a generic
servlet container isn't a supported configuration.  What is produced from
ant dist is effectively the exploded form of the WAR. You can still create
the war using ant dist-war, but that wiki page needs an overhaul!

If you want to play with Solr first, I think the better alternative is to
download the binary distribution, that has a number of examples that just
work out of the box.  Get used to what is in that distribution and explore
how that is laid out before you start to play with the code (just my
tuppence worth).

On 13 July 2017 at 21:16, Steve Pruitt  wrote:

> I have been following the instructions on the Solr Wiki for compiling
> Solr.  I started with the 6.6 source.  The only thing I did different was
> download the src directly.  I did not use Subversion.
> I made through step 7 - Compile application with no problems.  However,
> the dist folder contains newly build snapshot jars, but no war file.
> The last item in step 7 is copy the war file to the solr\example\webapps
> folder.  I have no solr\webapps folder either.
> A webapp folder was created under \solr, but it contains only what looks
> like client parts.  The WEB-INF folder only has the web.xml file.
>
> I noticed step 8 describes navigating to the solr\example directory and
> executing the start.jar.  But, there is no start.jar under example.  It's
> under solr\server.
>
> Not sure what to do next.  I feel like I have missed a step, or something.
>
> Thanks.
>
> -Steve
>


Re: NullPointerException on openStreams

2017-07-13 Thread Joe Obernberger
Thanks for this.  I'm now trying to use stream for classify, but am 
getting an ArrayIndexOutOfBounds error on the stream.open().  I'm 
setting the streamFactory up, and including 
.withFunctionName("classify", ClassifyStream.class) - but is that class 
in orga.apache.solr.handler?


-
StringBuilder expression = new StringBuilder();
solrCollection = getCollectionFromProfileBean(pBean);
expression.append("classify(model(models,id=\"").append(pBean.getModelID()).append("\",cacheMillis=5000),");
expression.append("search(").append(solrCollection).append(",q=\"DocumentId:").append(docID).append("\",");
expression.append("fl=\"ClusterText,id\",sort=\"id 
asc\"),field=\"ClusterText\")");
logger.info("Have classify expression:\n" + 
expression.toString() + "\n");

params.set("expr", expression.toString());
params.set("qt", "/stream");
params.set("explain", "true");
params.set("q", "*:*");
params.set("fl", "id");
params.set("sort", "id asc");

context = new StreamContext();
context.setSolrClientCache(StaticInfo.getSingleton(props).getClientCache());
context.workerID = 0;
context.numWorkers = 1;
context.setModelCache(StaticInfo.getSingleton(props).getModelCache());

streamFactory.withCollectionZkHost(solrCollection, 
props.getProperty("hbase.zookeeper.solr.quorum"))

.withFunctionName("search", CloudSolrStream.class)
.withFunctionName("facet", FacetStream.class)
.withFunctionName("update", UpdateStream.class)
.withFunctionName("jdbc", JDBCStream.class)
.withFunctionName("topic", TopicStream.class)
.withFunctionName("commit", CommitStream.class)
// decorator streams
.withFunctionName("merge", MergeStream.class)
.withFunctionName("unique", UniqueStream.class)
.withFunctionName("top", RankStream.class)
.withFunctionName("reduce", ReducerStream.class)
.withFunctionName("parallel", ParallelStream.class)
.withFunctionName("rollup", RollupStream.class)
.withFunctionName("stats", StatsStream.class)
.withFunctionName("innerJoin", InnerJoinStream.class)
.withFunctionName("leftOuterJoin", 
LeftOuterJoinStream.class)

.withFunctionName("hashJoin", HashJoinStream.class)
.withFunctionName("outerHashJoin", 
OuterHashJoinStream.class)

.withFunctionName("intersect", IntersectStream.class)
.withFunctionName("complement", ComplementStream.class)
.withFunctionName(SORT, SortStream.class)
.withFunctionName("train", TextLogitStream.class)
.withFunctionName("features", 
FeaturesSelectionStream.class)

.withFunctionName("daemon", DaemonStream.class)
.withFunctionName("shortestPath", 
ShortestPathStream.class)
.withFunctionName("gatherNodes", 
GatherNodesStream.class)

.withFunctionName("nodes", GatherNodesStream.class)
.withFunctionName("select", SelectStream.class)
.withFunctionName("shortestPath", 
ShortestPathStream.class)
.withFunctionName("gatherNodes", 
GatherNodesStream.class)

.withFunctionName("nodes", GatherNodesStream.class)
.withFunctionName("scoreNodes", ScoreNodesStream.class)
.withFunctionName("model", ModelStream.class)
.withFunctionName("classify", ClassifyStream.class)
.withFunctionName("fetch", FetchStream.class)
.withFunctionName("executor", ExecutorStream.class)
.withFunctionName("null", NullStream.class)
.withFunctionName("priority", PriorityStream.class)
.withFunctionName("significantTerms", 
SignificantTermsStream.class)
.withFunctionName("cartesianProduct", 
CartesianProductStream.class)

.withFunctionName("shuffle", ShuffleStream.class)
.withFunctionName("calc", CalculatorStream.class)
.withFunctionName("eval", EvalStream.class)
.withFunctionName("echo", EchoStream.class)
.withFunctionName("cell", CellStream.class)
.withFunctionName("list", ListStream.class)
.withFunctionName("let", LetStream.class)
.withFunctionName("get", GetStream.class)
.withFunctionName("timeseries", TimeSeriesStream.class)
.withFunctionName("tuple", TupStream.class)
// metrics
 

compiling Solr

2017-07-13 Thread Steve Pruitt
I have been following the instructions on the Solr Wiki for compiling Solr.  I 
started with the 6.6 source.  The only thing I did different was download the 
src directly.  I did not use Subversion.
I made through step 7 - Compile application with no problems.  However, the 
dist folder contains newly build snapshot jars, but no war file.
The last item in step 7 is copy the war file to the solr\example\webapps 
folder.  I have no solr\webapps folder either.
A webapp folder was created under \solr, but it contains only what looks like 
client parts.  The WEB-INF folder only has the web.xml file.

I noticed step 8 describes navigating to the solr\example directory and 
executing the start.jar.  But, there is no start.jar under example.  It's under 
solr\server.

Not sure what to do next.  I feel like I have missed a step, or something.

Thanks.

-Steve


Re: NullPointerException on openStreams

2017-07-13 Thread Joe Obernberger

Thank you Joel - that was it.

context = new StreamContext();
context.setSolrClientCache(StaticInfo.getSingleton(props).getClientCache());
context.workerID = 0;
context.numWorkers = 1;
context.setModelCache(StaticInfo.getSingleton(props).getModelCache());

Then:
stream = new 
CloudSolrStream(props.getProperty("hbase.zookeeper.solr.quorum"), 
solrCollectionName, params);

stream.setStreamContext(context);

Did the trick.  I suspect it will be a problem if multiple programs use 
the name workerID; will do more reading.


-Joe

On 7/13/2017 2:18 PM, Joel Bernstein wrote:

It's most likely that you're not setting the StreamContext. New versions of
Solr expect the StreamContext to be set before the stream is opened. The
SolrClientCache also needs to present in the StreamContext. You can take a
look at how the StreamHandler does this for an example:
https://github.com/apache/lucene-solr/blob/master/solr/core/src/java/org/apache/solr/handler/StreamHandler.java#L339

Joel Bernstein
http://joelsolr.blogspot.com/

On Thu, Jul 13, 2017 at 2:06 PM, Joe Obernberger <
joseph.obernber...@gmail.com> wrote:


Hi All - trying to call ClouderSolrStream.open(), but I'm getting this
error:

java.io.IOException: java.lang.NullPointerException
  at org.apache.solr.client.solrj.io.stream.CloudSolrStream.const
ructStreams(CloudSolrStream.java:408)
  at org.apache.solr.client.solrj.io.stream.CloudSolrStream.open(
CloudSolrStream.java:299)

I'm passing in a valid zkHost, collection name, and parameters. In fact,
if I take the stream expression and past it into the GUI, it works OK.  I'm
stumped by what could be null here.

My code looks like the following, and I'm getting the error on
stream.open().

 StringBuilder expression = new StringBuilder();
 expression.append("update(models, batchSize=\"50\",");
expression.append("train(").append(solrCollectionName).append(",");
expression.append("features(").append(solrCollectionName).append(",");
expression.append("q=\"*:*\",featureSet=\"FSet_").append(sol
rCollectionName).append("\",");
expression.append("field=\"Text\",outcome=\"out_i\",positive
Label=1,numTerms=").append(numTerms).append("),");
expression.append("q=\"*:*\",name=\"").append(docID).append(
"\",field=\"Text\",outcome=\"out_i\",maxIterations=\"").
append(maxIterations).append("\"))");
 logger.info("Have update expression:\n"+expression.toSt
ring()+"\n");
 params.set("expr", expression.toString());
 params.set("qt", "/stream");
 params.set("explain", "true");
 params.set("q", "*:*");
 params.set("fl", "id");
 params.set("sort", "id asc");
 try {
 System.out.println("Open: "+props.getProperty("hbase.zoo
keeper.solr.quorum")+"\nCollection: "+solrCollectionName+" \nWith params:
"+params);
 stream = new CloudSolrStream(props.getPrope
rty("hbase.zookeeper.solr.quorum"), solrCollectionName, params);
 stream.open();
 while (true) {
 Tuple tuple = stream.read();
 logger.info("Tuple Read: "+tuple.fields.toString());
 if (tuple.EOF) {
 break;
 }
 }
 } catch (IOException ex) {
 logger.error("Solr stream error: " + ex);
 ex.printStackTrace();
 } finally {
 if (stream != null) {
 try {
 stream.close();
 } catch (IOException ex) {
 logger.error("Could not close stream: "+ex);
 }
 }
 }

I'm stuck!  Thanks!

-Joe




---
This email has been checked for viruses by AVG.
http://www.avg.com





Re: NullPointerException on openStreams

2017-07-13 Thread Susheel Kumar
This the working code snippet I have, if that helps

public static void main(String []args) throws IOException
{
String clause;
   TupleStream stream;
   List tuples;
   StreamContext streamContext = new StreamContext();
   SolrClientCache solrClientCache = new SolrClientCache();
   streamContext.setSolrClientCache(solrClientCache);

   StreamFactory factory = new StreamFactory()
 .withCollectionZkHost("gettingstarted",
"server1:2182, server2:2182,server3:2182/solr66")
  //  .withCollectionZkHost("gettingstarted", "localhost:2181")
.withFunctionName("search", CloudSolrStream.class)
 .withFunctionName("select", SelectStream.class)
 .withFunctionName("add", AddEvaluator.class)
 .withFunctionName("if", IfThenElseEvaluator.class)
 .withFunctionName("gt", GreaterThanEvaluator.class)
 .withFunctionName("let", LetStream.class)
 .withFunctionName("get", GetStream.class)
 .withFunctionName("echo", EchoStream.class)
 .withFunctionName("merge", MergeStream.class)
 .withFunctionName("sort", SortStream.class)
 .withFunctionName("tuple", TupStream.class)
 .withFunctionName("rollup",RollupStream.class)
 .withFunctionName("hashJoin", HashJoinStream.class)
 .withFunctionName("complement", ComplementStream.class)
 .withFunctionName("fetch", FetchStream.class)
 .withFunctionName("having",HavingStream.class)
 .withFunctionName("eq", EqualsEvaluator.class)
 .withFunctionName("count", CountMetric.class)
 .withFunctionName("facet", FacetStream.class)
 .withFunctionName("sum", SumMetric.class)
 .withFunctionName("unique", UniqueStream.class)
 .withFunctionName("uniq", UniqueMetric.class)
 .withFunctionName("innerJoin", InnerJoinStream.class)
 .withFunctionName("intersect", IntersectStream.class)

 ;
   try {
clause = getClause2();
 //   clause = getFacet();
 stream = factory.constructStream(clause);
 stream.setStreamContext(streamContext);
 tuples = getTuples(stream);

 for(Tuple tuple : tuples )
 {
 System.out.println(tuple.getString("id"));
 System.out.println(tuple.getString("sr_sv_business_email_s"));
 System.out.println(tuple.getString("sum(price_i)"));
 System.out.println(tuple.getString("count(price_i)"));
 System.out.println(tuple.getString("unique(price_i)"));
 System.out.println(tuple.getString("email"));
 }

 System.out.println("Total tuples retunred "+tuples.size());
   } finally {
   solrClientCache.close();
 }

On Thu, Jul 13, 2017 at 2:18 PM, Joel Bernstein  wrote:

> It's most likely that you're not setting the StreamContext. New versions of
> Solr expect the StreamContext to be set before the stream is opened. The
> SolrClientCache also needs to present in the StreamContext. You can take a
> look at how the StreamHandler does this for an example:
> https://github.com/apache/lucene-solr/blob/master/solr/
> core/src/java/org/apache/solr/handler/StreamHandler.java#L339
>
> Joel Bernstein
> http://joelsolr.blogspot.com/
>
> On Thu, Jul 13, 2017 at 2:06 PM, Joe Obernberger <
> joseph.obernber...@gmail.com> wrote:
>
> > Hi All - trying to call ClouderSolrStream.open(), but I'm getting this
> > error:
> >
> > java.io.IOException: java.lang.NullPointerException
> >  at org.apache.solr.client.solrj.io.stream.CloudSolrStream.const
> > ructStreams(CloudSolrStream.java:408)
> >  at org.apache.solr.client.solrj.io.stream.CloudSolrStream.open(
> > CloudSolrStream.java:299)
> >
> > I'm passing in a valid zkHost, collection name, and parameters. In fact,
> > if I take the stream expression and past it into the GUI, it works OK.
> I'm
> > stumped by what could be null here.
> >
> > My code looks like the following, and I'm getting the error on
> > stream.open().
> >
> > StringBuilder expression = new StringBuilder();
> > expression.append("update(models, batchSize=\"50\",");
> > expression.append("train(").append(solrCollectionName).append(",");
> > expression.append("features(").append(solrCollectionName).append(",");
> > expression.append("q=\"*:*\",featureSet=\"FSet_").append(sol
> > rCollectionName).append("\",");
> > expression.append("field=\"Text\",outcome=\"out_i\",positive
> > Label=1,numTerms=").append(numTerms).append("),");
> > expression.append("q=\"*:*\",name=\"").append(docID).append(
> > "\",field=\"Text\",outcome=\"out_i\",maxIterations=\"").
> > append(maxIterations).append("\"))");
> > logger.info("Have update expression:\n"+expression.toSt
> > ring()+"\n");
> > params.set("expr", expression.toString());
> > params.set("qt", "/stream");
> > params.set("explain", "true");
> > params.set("q", "*:*");
> > params.set("fl", "id");
> > params.set("sort", "id asc");
> > try {
> > System.out.println("Open: "+props.getProperty("hbase.zoo
> > keeper.solr.quorum")+"\nCollection: "+solrCollectionName+" \nWith
> params:
> > "+params);
> > stream = n

Re: NullPointerException on openStreams

2017-07-13 Thread Joel Bernstein
It's most likely that you're not setting the StreamContext. New versions of
Solr expect the StreamContext to be set before the stream is opened. The
SolrClientCache also needs to present in the StreamContext. You can take a
look at how the StreamHandler does this for an example:
https://github.com/apache/lucene-solr/blob/master/solr/core/src/java/org/apache/solr/handler/StreamHandler.java#L339

Joel Bernstein
http://joelsolr.blogspot.com/

On Thu, Jul 13, 2017 at 2:06 PM, Joe Obernberger <
joseph.obernber...@gmail.com> wrote:

> Hi All - trying to call ClouderSolrStream.open(), but I'm getting this
> error:
>
> java.io.IOException: java.lang.NullPointerException
>  at org.apache.solr.client.solrj.io.stream.CloudSolrStream.const
> ructStreams(CloudSolrStream.java:408)
>  at org.apache.solr.client.solrj.io.stream.CloudSolrStream.open(
> CloudSolrStream.java:299)
>
> I'm passing in a valid zkHost, collection name, and parameters. In fact,
> if I take the stream expression and past it into the GUI, it works OK.  I'm
> stumped by what could be null here.
>
> My code looks like the following, and I'm getting the error on
> stream.open().
>
> StringBuilder expression = new StringBuilder();
> expression.append("update(models, batchSize=\"50\",");
> expression.append("train(").append(solrCollectionName).append(",");
> expression.append("features(").append(solrCollectionName).append(",");
> expression.append("q=\"*:*\",featureSet=\"FSet_").append(sol
> rCollectionName).append("\",");
> expression.append("field=\"Text\",outcome=\"out_i\",positive
> Label=1,numTerms=").append(numTerms).append("),");
> expression.append("q=\"*:*\",name=\"").append(docID).append(
> "\",field=\"Text\",outcome=\"out_i\",maxIterations=\"").
> append(maxIterations).append("\"))");
> logger.info("Have update expression:\n"+expression.toSt
> ring()+"\n");
> params.set("expr", expression.toString());
> params.set("qt", "/stream");
> params.set("explain", "true");
> params.set("q", "*:*");
> params.set("fl", "id");
> params.set("sort", "id asc");
> try {
> System.out.println("Open: "+props.getProperty("hbase.zoo
> keeper.solr.quorum")+"\nCollection: "+solrCollectionName+" \nWith params:
> "+params);
> stream = new CloudSolrStream(props.getPrope
> rty("hbase.zookeeper.solr.quorum"), solrCollectionName, params);
> stream.open();
> while (true) {
> Tuple tuple = stream.read();
> logger.info("Tuple Read: "+tuple.fields.toString());
> if (tuple.EOF) {
> break;
> }
> }
> } catch (IOException ex) {
> logger.error("Solr stream error: " + ex);
> ex.printStackTrace();
> } finally {
> if (stream != null) {
> try {
> stream.close();
> } catch (IOException ex) {
> logger.error("Could not close stream: "+ex);
> }
> }
> }
>
> I'm stuck!  Thanks!
>
> -Joe
>
>


NullPointerException on openStreams

2017-07-13 Thread Joe Obernberger
Hi All - trying to call ClouderSolrStream.open(), but I'm getting this 
error:


java.io.IOException: java.lang.NullPointerException
 at 
org.apache.solr.client.solrj.io.stream.CloudSolrStream.constructStreams(CloudSolrStream.java:408)
 at 
org.apache.solr.client.solrj.io.stream.CloudSolrStream.open(CloudSolrStream.java:299)


I'm passing in a valid zkHost, collection name, and parameters. In fact, 
if I take the stream expression and past it into the GUI, it works OK.  
I'm stumped by what could be null here.


My code looks like the following, and I'm getting the error on 
stream.open().


StringBuilder expression = new StringBuilder();
expression.append("update(models, batchSize=\"50\",");
expression.append("train(").append(solrCollectionName).append(",");
expression.append("features(").append(solrCollectionName).append(",");
expression.append("q=\"*:*\",featureSet=\"FSet_").append(solrCollectionName).append("\",");
expression.append("field=\"Text\",outcome=\"out_i\",positiveLabel=1,numTerms=").append(numTerms).append("),");
expression.append("q=\"*:*\",name=\"").append(docID).append("\",field=\"Text\",outcome=\"out_i\",maxIterations=\"").append(maxIterations).append("\"))");
logger.info("Have update 
expression:\n"+expression.toString()+"\n");

params.set("expr", expression.toString());
params.set("qt", "/stream");
params.set("explain", "true");
params.set("q", "*:*");
params.set("fl", "id");
params.set("sort", "id asc");
try {
System.out.println("Open: 
"+props.getProperty("hbase.zookeeper.solr.quorum")+"\nCollection: 
"+solrCollectionName+" \nWith params: "+params);
stream = new 
CloudSolrStream(props.getProperty("hbase.zookeeper.solr.quorum"), 
solrCollectionName, params);

stream.open();
while (true) {
Tuple tuple = stream.read();
logger.info("Tuple Read: "+tuple.fields.toString());
if (tuple.EOF) {
break;
}
}
} catch (IOException ex) {
logger.error("Solr stream error: " + ex);
ex.printStackTrace();
} finally {
if (stream != null) {
try {
stream.close();
} catch (IOException ex) {
logger.error("Could not close stream: "+ex);
}
}
}

I'm stuck!  Thanks!

-Joe



Re: How to Debug Solr With Eclipse

2017-07-13 Thread Giovanni De Stefano
Hello Rainer,

you have the right link: select the version you want and download the -src 
version.

Once un untar the .tgz you can run `ant eclipse` from the command line and then 
import the generated project in eclipse.

Please note that you will need both and and ivy installed (just start with ant 
eclipse and take it from there: the script will tell you what to do next).

I hope it helps!

Cheers,
Giovanni


> On 13 Jul 2017, at 19:54, govind nitk  wrote:
> 
> Hi,
> 
> Solr has releases, kindly checkout to the needed one.
> 
> 
> cheers
> 
> On Thu, Jul 13, 2017 at 11:20 PM, Rainer Gnan 
> wrote:
> 
>> Hello community,
>> 
>> my aim is to develop solr custom code (e.g. UpdateRequestProcessor)
>> within Eclipse AND to test the code within a debuggable solr/lucene
>> local instance - also within Eclipse.
>> Searching the web led me to multiple instructions but for me no one
>> works.
>> 
>> The only relevant question I actually have to solve this problem is:
>> Where can I download the source code for the version I want that
>> includes the ANT build.xml for building an Eclipse-Project?
>> 
>> The solr project page (http://archive.apache.org/dist/lucene/solr/)
>> seems not to provide that.
>> 
>> I appreciate any hint!
>> 
>> Best regards
>> Rainer
>> 
>> 



Re: How to Debug Solr With Eclipse

2017-07-13 Thread govind nitk
Hi,

Solr has releases, kindly checkout to the needed one.


cheers

On Thu, Jul 13, 2017 at 11:20 PM, Rainer Gnan 
wrote:

> Hello community,
>
> my aim is to develop solr custom code (e.g. UpdateRequestProcessor)
> within Eclipse AND to test the code within a debuggable solr/lucene
> local instance - also within Eclipse.
> Searching the web led me to multiple instructions but for me no one
> works.
>
> The only relevant question I actually have to solve this problem is:
> Where can I download the source code for the version I want that
> includes the ANT build.xml for building an Eclipse-Project?
>
> The solr project page (http://archive.apache.org/dist/lucene/solr/)
> seems not to provide that.
>
> I appreciate any hint!
>
> Best regards
> Rainer
>
>


How to Debug Solr With Eclipse

2017-07-13 Thread Rainer Gnan
Hello community,

my aim is to develop solr custom code (e.g. UpdateRequestProcessor)
within Eclipse AND to test the code within a debuggable solr/lucene
local instance - also within Eclipse.
Searching the web led me to multiple instructions but for me no one
works.

The only relevant question I actually have to solve this problem is:
Where can I download the source code for the version I want that
includes the ANT build.xml for building an Eclipse-Project?

The solr project page (http://archive.apache.org/dist/lucene/solr/)
seems not to provide that.

I appreciate any hint!

Best regards
Rainer



Re: Need domain configuration assistance

2017-07-13 Thread govind nitk
1. run solr on different port other than 8983.
2. If you are exposing it publicly, dont expose through port. But have a
apache/nignx server in middle to pass traffic to solr.

cheers

On Thu, Jul 13, 2017 at 11:13 PM, Susheel Kumar 
wrote:

> But don't expose Solr outside to public...
>
> On Thu, Jul 13, 2017 at 1:41 PM, Susheel Kumar 
> wrote:
>
> > This window solr server must have a name and IP address associated with
> > it. Check from external content deliver servers if port 8983 to Solr
> server
> > is open and if so you can refer solr via http://:/
> solr.
> >   if port 8983 is not open then try to run solr 80/8080 or work with
> > network team to open the ports.  If you need to access solr server by
> > domain name then you would have to ask network team to create a DNS/VIP
> and
> > map it to solr IP address.
> >
> > Enjoy!!!
> >
> >
> >
> >
> >
> >
> > On Thu, Jul 13, 2017 at 1:23 PM, Bertini, Vickie <
> > vickie.bert...@bannerhealth.com> wrote:
> >
> >> I have installed Solr 6.5.1 as a service on our Windows Server 2012. It
> >> is up and running properly under localhost:8983, however, I have a
> domain
> >> name I want to assign to it so our external content delivery servers can
> >> reach it for our web search. However, I am very new to Solr and mostly
> only
> >> familiar with IIS, not jetty, so is there documentation on how I would
> >> configure solr to run on our new domain/IP instead of localhost? Web
> >> searches up to this point have been fairly unproductive and unhelpful.
> >>
> >>
> >>
> >> *Vickie Bertini*
> >> IT Sitecore Architect
> >>
> >> Digital Business Technology
> >> 602.747.7186 <(602)%20747-7186> office
> >>
> >>
> >>
> >> 
> >>
> >>
> >>
> >
> >
>


Re: Need domain configuration assistance

2017-07-13 Thread Susheel Kumar
But don't expose Solr outside to public...

On Thu, Jul 13, 2017 at 1:41 PM, Susheel Kumar 
wrote:

> This window solr server must have a name and IP address associated with
> it. Check from external content deliver servers if port 8983 to Solr server
> is open and if so you can refer solr via http://:/solr.
>   if port 8983 is not open then try to run solr 80/8080 or work with
> network team to open the ports.  If you need to access solr server by
> domain name then you would have to ask network team to create a DNS/VIP and
> map it to solr IP address.
>
> Enjoy!!!
>
>
>
>
>
>
> On Thu, Jul 13, 2017 at 1:23 PM, Bertini, Vickie <
> vickie.bert...@bannerhealth.com> wrote:
>
>> I have installed Solr 6.5.1 as a service on our Windows Server 2012. It
>> is up and running properly under localhost:8983, however, I have a domain
>> name I want to assign to it so our external content delivery servers can
>> reach it for our web search. However, I am very new to Solr and mostly only
>> familiar with IIS, not jetty, so is there documentation on how I would
>> configure solr to run on our new domain/IP instead of localhost? Web
>> searches up to this point have been fairly unproductive and unhelpful.
>>
>>
>>
>> *Vickie Bertini*
>> IT Sitecore Architect
>>
>> Digital Business Technology
>> 602.747.7186 <(602)%20747-7186> office
>>
>>
>>
>> 
>>
>>
>>
>
>


Re: Need domain configuration assistance

2017-07-13 Thread Susheel Kumar
This window solr server must have a name and IP address associated with it.
Check from external content deliver servers if port 8983 to Solr server is
open and if so you can refer solr via http://:/solr.
if port 8983 is not open then try to run solr 80/8080 or work with network
team to open the ports.  If you need to access solr server by domain name
then you would have to ask network team to create a DNS/VIP and map it to
solr IP address.

Enjoy!!!






On Thu, Jul 13, 2017 at 1:23 PM, Bertini, Vickie <
vickie.bert...@bannerhealth.com> wrote:

> I have installed Solr 6.5.1 as a service on our Windows Server 2012. It is
> up and running properly under localhost:8983, however, I have a domain name
> I want to assign to it so our external content delivery servers can reach
> it for our web search. However, I am very new to Solr and mostly only
> familiar with IIS, not jetty, so is there documentation on how I would
> configure solr to run on our new domain/IP instead of localhost? Web
> searches up to this point have been fairly unproductive and unhelpful.
>
>
>
> *Vickie Bertini*
> IT Sitecore Architect
>
> Digital Business Technology
> 602.747.7186 <(602)%20747-7186> office
>
>
>
> 
>
>
>


Need domain configuration assistance

2017-07-13 Thread Bertini, Vickie
I have installed Solr 6.5.1 as a service on our Windows Server 2012. It is up 
and running properly under localhost:8983, however, I have a domain name I want 
to assign to it so our external content delivery servers can reach it for our 
web search. However, I am very new to Solr and mostly only familiar with IIS, 
not jetty, so is there documentation on how I would configure solr to run on 
our new domain/IP instead of localhost? Web searches up to this point have been 
fairly unproductive and unhelpful.

Vickie Bertini
IT Sitecore Architect
Digital Business Technology
602.747.7186 office

[cid:image001.png@01D2FBC2.047465D0]



Re: suggestors on shingles

2017-07-13 Thread govind nitk
Hi Alessandro,

Currently fuzzy or lookup suggester is not supporting - returning
suggestions generated from the shingles at index time.
As you guided, I am using FreeText suggester. But freetext suggester won't
support the fuzzyness.

Let me know your inputs on this edge case.


Regards,
Govind




On Thu, Jul 13, 2017 at 8:03 PM, alessandro.benedetti 
wrote:

> To do what ?
> If it is a use case, please explain us.
>
> If it is just to check that the analysis chain worked correctly, you can
> check the schema browser or use Luke.
>
> If you just want to test your analysis chain, you can use the analysis tool
> in the Solr admin.
>
> Cheers
>
>
>
> -
> ---
> Alessandro Benedetti
> Search Consultant, R&D Software Engineer, Director
> Sease Ltd. - www.sease.io
> --
> View this message in context: http://lucene.472066.n3.
> nabble.com/suggestors-on-shingles-tp4345763p4345836.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>


RE: [EXTERNAL] - Re: accessing numfound value

2017-07-13 Thread Steve Pruitt
I see no reference to QueryResponse from ResponseBuilder.  QueryResponse 
appears to be a solr client class.

On ResponseBuilder there is a rsp member pointing to a SolrQueryResponse.  But 
this class doesn't seem to have access to the total hits.

I tried rb. getResponseDocs() which returns a SolrDocumentList.  It has a 
getNumFound() method.  But rb.getResponseDocs() is null.

Thanks.

-S

-Original Message-
From: Susheel Kumar [mailto:susheel2...@gmail.com] 
Sent: Thursday, July 13, 2017 6:47 AM
To: solr-user@lucene.apache.org
Subject: [EXTERNAL] - Re: accessing numfound value

You get back QueryResponse after executing a query.  Then you can simply use 
below to get qTime, ElapsedTime and numFound.

response.getQTime(),

response.getElapsedTime()

response.getResults().getNumFound()
Thanks,
Susheel

On Wed, Jul 12, 2017 at 4:29 PM, Steve Pruitt  wrote:

> I'm having difficulty finding the value for numFound that is in the 
> response.  My context is a custom component in the last-components 
> list for /select.
>
> Where rb is the ResponseBuilder parameter for the process(..) method:
>
> rb.getNumberDocumentsFound() is 0.
> rb.totalHitCount is 0.
>
> I don't understand those values, why they are 0.
>
> rb.getResults().docList.size() returns only the row size from the query.
> I need the total hits.
>
> In the JavaDoc it states rb.rsp.getResponse() returns just an Object.  
> I found it to be an instance of BasicResultContext in my case.  But, 
> nothing in its description hints at how to get at the total found.
>
> Can someone help?
>
> Thanks.
>
> -S
>


RE: [EXTERNAL] - Re: accessing numfound value

2017-07-13 Thread Steve Pruitt
Sorry. I am just starting out, so it's hard to know what is needed to describe 
a problem.

Yes, I get matches.  I use the default row setting of 10 and I the response has 
10 matches.  But, the total number found is 53, which is correct.  I am using a 
test index and I know 53 is the correct total.

53 shows up as the value for numFound in the response.  I simply cannot find 
where this value is located starting from ResponseBuilder.

Thanks.

-S

-Original Message-
From: Rick Leir [mailto:rl...@leirtech.com] 
Sent: Thursday, July 13, 2017 6:42 AM
To: solr-user@lucene.apache.org
Subject: [EXTERNAL] - Re: accessing numfound value

Steve,
This is a wild guess because you are not telling us nearly enough. The guess: 
you are not getting any matches or hits. O. Cheers --Rick

On July 12, 2017 4:29:43 PM EDT, Steve Pruitt  wrote:
>I'm having difficulty finding the value for numFound that is in the 
>response.  My context is a custom component in the last-components list 
>for /select.
>
>Where rb is the ResponseBuilder parameter for the process(..) method:
>
>rb.getNumberDocumentsFound() is 0.
>rb.totalHitCount is 0.
>
>I don't understand those values, why they are 0.
>
>rb.getResults().docList.size() returns only the row size from the 
>query.  I need the total hits.
>
>In the JavaDoc it states rb.rsp.getResponse() returns just an Object. 
>I found it to be an instance of BasicResultContext in my case.  But, 
>nothing in its description hints at how to get at the total found.
>
>Can someone help?
>
>Thanks.
>
>-S

--
Sorry for being brief. Alternate email is rickleir at yahoo dot com 


Re: enable fault-tolerance by default on collection?

2017-07-13 Thread Erick Erickson
That's the purpose of the  and  sections of the
various request handlers in solrconfig.xml.

Best,
Erick

On Thu, Jul 13, 2017 at 1:32 PM,   wrote:
> Is it possible to enable shards.tolerant=true parameter by default?
>
> We are using Spark Thrif Server`s JDBC API to access a collection, while 
> testing it has occurred that a completely gone shard is creating problems. 
> Can this behavior be enabled through configuration and not from inside the 
> query request?
>
> Regards,
> Imran
>
> Sent from Mail for Windows 10
>


Re: suggestors on shingles

2017-07-13 Thread alessandro.benedetti
To do what ?
If it is a use case, please explain us.

If it is just to check that the analysis chain worked correctly, you can
check the schema browser or use Luke.

If you just want to test your analysis chain, you can use the analysis tool
in the Solr admin.

Cheers



-
---
Alessandro Benedetti
Search Consultant, R&D Software Engineer, Director
Sease Ltd. - www.sease.io
--
View this message in context: 
http://lucene.472066.n3.nabble.com/suggestors-on-shingles-tp4345763p4345836.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: HTTP ERROR 504 - Optimize

2017-07-13 Thread Walter Underwood
Optimize can take a long time.

Why are you doing an optimize? It doesn’t really optimize the index, it only 
forces merges and deletions. Solr does that automatically in the background.

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


> On Jul 13, 2017, at 5:42 AM, marotosg  wrote:
> 
> Hi,
> 
> I am getting HTTP ERROR 504 when doing an optimization operation. Not
> always, it's pretty random.
> Trying to figure out if Solr, jetty or either the browser breaks the
> connection after specific time.
> I have successful optimizations which take aprox 10 minutes.
> 
> I had a look to Solr Source code and can't find anywhere where Solr returns
> a 504 error message so I assume could be Jetty.  Checking Jetty and can't
> find any parameter other than
>  default="5"/>
> Which I assume is set to 50 seconds.
> I am using Solr6.1. 
> 
> Any help?
> 
> Thanks a lot
> Sergio
> 
> 
> 
> --
> View this message in context: 
> http://lucene.472066.n3.nabble.com/HTTP-ERROR-504-Optimize-tp4345815.html
> Sent from the Solr - User mailing list archive at Nabble.com.



dynamic datasource password in db_data_config file

2017-07-13 Thread javeed
HI Team,
As per my requirement I need to pass password dynamically to data source .
I did it successfully through Http URL by auto indexing time. Like below.

In Application data import property file declare URL and password like this 

params=/dataimport?command=delta-import&clean=false&commit=true&pwd=Beta*

In SOLR Core(web logic) db-data-config.xml file fetching password on auto
indexing like bellow.




But In this case if password changed need to deploy application Again with
new password,


So, I declare password variable in solrconfig.xml , dataimport.properties
and core.properties files and try to fetch in to db-data-config.xml file,
But its not working. Can you please help me out to use password in
configuration file like able to update with put deployment.

Thank you
Javeed Ali Khan



--
View this message in context: 
http://lucene.472066.n3.nabble.com/dynamic-datasource-password-in-db-data-config-file-tp4345804.html
Sent from the Solr - User mailing list archive at Nabble.com.


HTTP ERROR 504 - Optimize

2017-07-13 Thread marotosg
Hi,

I am getting HTTP ERROR 504 when doing an optimization operation. Not
always, it's pretty random.
Trying to figure out if Solr, jetty or either the browser breaks the
connection after specific time.
I have successful optimizations which take aprox 10 minutes.

I had a look to Solr Source code and can't find anywhere where Solr returns
a 504 error message so I assume could be Jetty.  Checking Jetty and can't
find any parameter other than

Which I assume is set to 50 seconds.
I am using Solr6.1. 

Any help?

Thanks a lot
Sergio



--
View this message in context: 
http://lucene.472066.n3.nabble.com/HTTP-ERROR-504-Optimize-tp4345815.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Creating a custom auth plugin for solr

2017-07-13 Thread Jan Høydahl
I assume you already read 
http://lucene.apache.org/solr/guide/6_6/authentication-and-authorization-plugins.html
 

When you implement a custom auth plugin you are free to e.g. pull HTTP headers 
for validation, like the BasicAuth plugin does.
Then, your plugin will OK the authenticated user and you may then use the 
built-in authorization plugin to configure what that user can do in the system.

I suggest you start looking at the code for the existing plugins and work from 
there, and then come back and ask questions when you’re stuck.

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

> 13. jul. 2017 kl. 06.34 skrev srshaik :
> 
> Hi,
> 
> I am new to solr security and wanted some help / reference on how to
> implement custom authentication and authorization in solr cloud.
> 
> I would like to use JWT. Is that possible ?
> 
> 
> 
> --
> View this message in context: 
> http://lucene.472066.n3.nabble.com/Creating-a-custom-auth-plugin-for-solr-tp4345762.html
> Sent from the Solr - User mailing list archive at Nabble.com.



Re: Solr Analyzer for Vietnamese

2017-07-13 Thread Jan Høydahl
Cao, did you see this email from Eirik?

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

> 1. jun. 2017 kl. 13.33 skrev Eirik Hungnes :
> 
> Thanks Erick,
> 
> Dat:
> 
> Do you have more info about the subject?
> 
> 2017-05-22 17:08 GMT+02:00 Erick Erickson :
> 
>> Eirik:
>> 
>> That code is 4 years old and for Lucene 4. I doubt it applies cleanly
>> to the current code base, but feel free to give it a try but it's not
>> guaranteed.
>> 
>> I know of no other Vietnamese analyzers available.
>> 
>> Dat is active in the community, don't know whether he has plans to
>> update/commit that bit of code.
>> 
>> Best,
>> Erick
>> 
>> On Mon, May 22, 2017 at 12:25 AM, Eirik Hungnes
>>  wrote:
>>> Hi,
>>> 
>>> There doesn't seem to be any Tokenizer / Analyzer for Vietnamese built in
>>> to Lucene at the moment. Does anyone know if something like this exists
>>> today or is planned for? We found this
>>> https://github.com/CaoManhDat/VNAnalyzer made by Cao Mahn Dat, but not
>> sure
>>> if it's up to date. Any info highly appreciated!
>>> 
>>> Thanks,
>>> 
>>> Eirik
>> 
> 
> 
> 
> -- 
> Best regards,
> 
> Eirik Hungnes
> CTO
> Rubrikk Group AS
> 
> Cell: +4797027732
> skypeid: blindkorn44



Re: suggestors on shingles

2017-07-13 Thread govind nitk
Hi Alessandro,

Thanks a lot. I followed your blog and able to get the suggestions.

But I am curious about solr returning the tokenized data.
So, lot of filtering happended, shingles are generated, now Is it possible
to get those finally genrated tokens any way ?


Regards,
Govind


On Thu, Jul 13, 2017 at 4:00 PM, alessandro.benedetti 
wrote:

> I would recommend this blog of mine to get a better understanding of how
> tokenization and the suggester work together [1] .
>
> If you take a look to the FuzzyLookupFactory, you will see that it is one
> of
> the suggesters that return the entire content of the field.
>
> You may be interested to the FreeTextLookupFactory.
>
> Cheers
>
>
> [1] http://alexbenedetti.blogspot.co.uk/2015/07/solr-you-complete-me.html
>
>
>
> -
> ---
> Alessandro Benedetti
> Search Consultant, R&D Software Engineer, Director
> Sease Ltd. - www.sease.io
> --
> View this message in context: http://lucene.472066.n3.
> nabble.com/suggestors-on-shingles-tp4345763p4345793.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>


Re: accessing numfound value

2017-07-13 Thread Susheel Kumar
You get back QueryResponse after executing a query.  Then you can simply
use below to get qTime, ElapsedTime and numFound.

response.getQTime(),

response.getElapsedTime()

response.getResults().getNumFound()
Thanks,
Susheel

On Wed, Jul 12, 2017 at 4:29 PM, Steve Pruitt  wrote:

> I'm having difficulty finding the value for numFound that is in the
> response.  My context is a custom component in the last-components list for
> /select.
>
> Where rb is the ResponseBuilder parameter for the process(..) method:
>
> rb.getNumberDocumentsFound() is 0.
> rb.totalHitCount is 0.
>
> I don't understand those values, why they are 0.
>
> rb.getResults().docList.size() returns only the row size from the query.
> I need the total hits.
>
> In the JavaDoc it states rb.rsp.getResponse() returns just an Object.  I
> found it to be an instance of BasicResultContext in my case.  But, nothing
> in its description hints at how to get at the total found.
>
> Can someone help?
>
> Thanks.
>
> -S
>


Re: accessing numfound value

2017-07-13 Thread Rick Leir
Steve,
This is a wild guess because you are not telling us nearly enough. The guess: 
you are not getting any matches or hits. O. Cheers --Rick

On July 12, 2017 4:29:43 PM EDT, Steve Pruitt  wrote:
>I'm having difficulty finding the value for numFound that is in the
>response.  My context is a custom component in the last-components list
>for /select.
>
>Where rb is the ResponseBuilder parameter for the process(..) method:
>
>rb.getNumberDocumentsFound() is 0.
>rb.totalHitCount is 0.
>
>I don't understand those values, why they are 0.
>
>rb.getResults().docList.size() returns only the row size from the
>query.  I need the total hits.
>
>In the JavaDoc it states rb.rsp.getResponse() returns just an Object. 
>I found it to be an instance of BasicResultContext in my case.  But,
>nothing in its description hints at how to get at the total found.
>
>Can someone help?
>
>Thanks.
>
>-S

-- 
Sorry for being brief. Alternate email is rickleir at yahoo dot com 

Re: Do I need to declare TermVectorComponent for best MoreLikeThis results?

2017-07-13 Thread alessandro.benedetti
You don't need the TermVectorComponent at all for MLT.

The reason the Term Vector is suggested for the fields you are interested
in, is just because this will speed up the way the MLT will retrieve the
"interesting terms" out of your seed document to build the MLT query.

If you don't have the Term Vector enabled, the MLT will analyse the content
of fields on the fly with the analysis chain in input.

Cheers



-
---
Alessandro Benedetti
Search Consultant, R&D Software Engineer, Director
Sease Ltd. - www.sease.io
--
View this message in context: 
http://lucene.472066.n3.nabble.com/Do-I-need-to-declare-TermVectorComponent-for-best-MoreLikeThis-results-tp4345646p4345794.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: suggestors on shingles

2017-07-13 Thread alessandro.benedetti
I would recommend this blog of mine to get a better understanding of how
tokenization and the suggester work together [1] .

If you take a look to the FuzzyLookupFactory, you will see that it is one of
the suggesters that return the entire content of the field.

You may be interested to the FreeTextLookupFactory.

Cheers


[1] http://alexbenedetti.blogspot.co.uk/2015/07/solr-you-complete-me.html



-
---
Alessandro Benedetti
Search Consultant, R&D Software Engineer, Director
Sease Ltd. - www.sease.io
--
View this message in context: 
http://lucene.472066.n3.nabble.com/suggestors-on-shingles-tp4345763p4345793.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: enable fault-tolerance by default on collection?

2017-07-13 Thread alessandro.benedetti
I would recommend to play with the default, append and invariants [1] element
for the reuqestHandler node.
Identify the request handler you want to use in the solrconfig.xml and then
add the parameter you want.
You should be abkle to manage this through your source version control
system.

Cheers

[1]
https://cwiki.apache.org/confluence/display/solr/RequestHandlers+and+SearchComponents+in+SolrConfig#RequestHandlersandSearchComponentsinSolrConfig-SearchHandlers



-
---
Alessandro Benedetti
Search Consultant, R&D Software Engineer, Director
Sease Ltd. - www.sease.io
--
View this message in context: 
http://lucene.472066.n3.nabble.com/enable-fault-tolerance-by-default-on-collection-tp4345780p4345792.html
Sent from the Solr - User mailing list archive at Nabble.com.


Creating a custom auth plugin for solr

2017-07-13 Thread srshaik
Hi,

I am new to solr security and wanted some help / reference on how to
implement custom authentication and authorization in solr cloud.

I would like to use JWT. Is that possible ?



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Creating-a-custom-auth-plugin-for-solr-tp4345762.html
Sent from the Solr - User mailing list archive at Nabble.com.


enable fault-tolerance by default on collection?

2017-07-13 Thread imran
Is it possible to enable shards.tolerant=true parameter by default? 

We are using Spark Thrif Server`s JDBC API to access a collection, while 
testing it has occurred that a completely gone shard is creating problems. Can 
this behavior be enabled through configuration and not from inside the query 
request?

Regards,
Imran

Sent from Mail for Windows 10