6.4.0 Realtime get can't find shard

2017-02-05 Thread Damien Kamerman
Hi,

I have a collection with 12 shards using the compositeId router and find
that the real-time get always throws an exception 'Can't find shard'. The
get works if I specify the exact /collection_shardX_replica1. I specify the
'id' and '_route_' params, for example /collection/get?id=test&_route_=test1

org.apache.solr.common.SolrException;
null:org.apache.solr.common.SolrException: Can't find shard
'ip_0_2017_q1_shard3'
at
org.apache.solr.handler.component.RealTimeGetComponent.sliceToShards(RealTimeGetComponent.java:536)
at
org.apache.solr.handler.component.RealTimeGetComponent.createSubRequests(RealTimeGetComponent.java:483)
at
org.apache.solr.handler.component.RealTimeGetComponent.distributedProcess(RealTimeGetComponent.java:439)
at
org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:345)
at
org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:166)
at org.apache.solr.core.SolrCore.execute(SolrCore.java:2306)
at
org.apache.solr.servlet.HttpSolrCall.execute(HttpSolrCall.java:658)
at org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:464)
at
org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:345)
at
org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:296)

I assume this is a bug.

Cheers,
Damien.


Facing an Issue on SOLR box

2017-02-05 Thread Arun Kumar
Hello Team,

We are facing an error "Cannot write to config directory 
/var/solr/data/marketing_prod_career_all_index/conf; switching to use InMemory 
storage instead." on our SOLR box.
As it's occur, SOLR service stopped to response and we have to restart it 
again. Now it's happening very frequently.

So please suggest what we can do to resolve this error.

Thanks & Regards,
-
Arun Kumar, Sitecore Specialist
Email: arun.kum...@internationalsos.com
Desk Number: +91-20-6607 4545 (7am to 4pm IST)
On-call Duty Cell: +91-916 863 2587 (4pm to 7am IST)
Personal Cell: +91-721 950 0421
Sitecore Support: 
dl.glb.itg.sitecoresupp...@internationalsos.com
Web: www.internationalsos.com



Re: Solr 6.4. Can't index MS Visio vsdx files

2017-02-05 Thread Gytis Mikuciunas
Hi again,

I've tried with tika-app - didn't help

java -jar tika-app-1.14.jar "I:\Dat\span ports.vsdx"
Exception in thread "main" java.lang.NoClassDefFoundError:
com/microsoft/schemas/office/visio/x2012/main/ConnectsType
at com.microsoft.schemas.office.visio.x2012.main.impl.
PageContentsTypeImpl.getConnects(Unknown Source)
at org.apache.poi.xdgf.usermodel.XDGFBaseContents.onDocumentRead(
XDGFBaseContents.java:89)
at org.apache.poi.xdgf.usermodel.XDGFPageContents.onDocumentRead(
XDGFPageContents.java:73)
at org.apache.poi.xdgf.usermodel.XDGFPages.onDocumentRead(
XDGFPages.java:94)
at org.apache.poi.xdgf.usermodel.XmlVisioDocument.onDocumentRead(
XmlVisioDocument.java:108)
at org.apache.poi.POIXMLDocument.load(POIXMLDocument.java:190)
at org.apache.poi.xdgf.usermodel.XmlVisioDocument.(
XmlVisioDocument.java:79)
at org.apache.poi.xdgf.extractor.XDGFVisioExtractor.(
XDGFVisioExtractor.java:41)
at org.apache.poi.extractor.ExtractorFactory.createExtractor(
ExtractorFactory.java:207)
at org.apache.tika.parser.microsoft.ooxml.
OOXMLExtractorFactory.parse(OOXMLExtractorFactory.java:86)
at org.apache.tika.parser.microsoft.ooxml.OOXMLParser.
parse(OOXMLParser.java:87)
at org.apache.tika.parser.CompositeParser.parse(
CompositeParser.java:280)
at org.apache.tika.parser.CompositeParser.parse(
CompositeParser.java:280)
at org.apache.tika.parser.AutoDetectParser.parse(
AutoDetectParser.java:120)
at org.apache.tika.cli.TikaCLI$OutputType.process(TikaCLI.java:191)
at org.apache.tika.cli.TikaCLI.process(TikaCLI.java:480)
at org.apache.tika.cli.TikaCLI.main(TikaCLI.java:145)
Caused by: java.lang.ClassNotFoundException: com.microsoft.schemas.office.
visio.x2012.main.ConnectsType
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 17 more


So next step is to open bug ticket on tika's jira.


And what about with your proposed workaround?
"If this is a missing bean issue (sorry, I can't tell from your stacktrace
which class is missing), as a temporary workaround, you can rm
"poi-ooxml-schemas" and add the full "ooxml-schemas", and you should be
good to go. [3]"

as tika is failing, is it could help or not?

Gytis


On Fri, Feb 3, 2017 at 10:31 PM, Allison, Timothy B. 
wrote:

> This is a Tika/POI problem.  Please download tika-app 1.14 [1] or a
> nightly version of Tika [2] and run
>
> java -jar tika-app.jar 
>
> If the problem is fixed, we'll try to upgrade dependencies in Solr.  If it
> isn't fixed, please open a bug on Tika's Jira.
>
> If this is a missing bean issue (sorry, I can't tell from your stacktrace
> which class is missing), as a temporary workaround, you can rm
> "poi-ooxml-schemas" and add the full "ooxml-schemas", and you should be
> good to go. [3]
>
> Cheers,
>
>   Tim
>
> [1] http://www.apache.org/dyn/closer.cgi/tika/tika-app-1.14.jar
>
> [2] https://builds.apache.org/job/Tika-trunk/1193/org.apache.
> tika$tika-app/artifact/org.apache.tika/tika-app/1.15-
> 20170202.203920-124/tika-app-1.15-20170202.203920-124.jar
>
> [3] http://poi.apache.org/faq.html#faq-N10025
>
> -Original Message-
> From: Alexandre Rafalovitch [mailto:arafa...@gmail.com]
> Sent: Friday, February 3, 2017 9:49 AM
> To: solr-user 
> Subject: Re: Solr 6.4. Can't index MS Visio vsdx files
>
> This kind of information extraction comes from Apache Tika that is shipped
> with Solr. However Solr does not ship every possible parser with its
> installation. So, I think you are hitting Tika where it manages to figure
> out what type of content you have, but does not have (Apache POI - another
> O/S project) library installed.
>
> What you need to do is to get the additional jar from Tika/POI's
> project/download and make it visible to Solr (probably as an extension jar
> in a lib folder somewhere - I am a bit hazy on that for latest Solr).
>
> The version of Tika that Solr uses is part of the changes notes. For 6.4,
> it is https://github.com/apache/lucene-solr/blob/releases/
> lucene-solr/6.4.0/solr/CHANGES.txt
> and it is Tika 1.13
>
> Hope it helps,
>Alex.
> 
> http://www.solr-start.com/ - Resources for Solr users, new and experienced
>
>
> On 3 February 2017 at 05:57, Gytis Mikuciunas  wrote:
> > Hi,
> >
> >
> > I'm using single core Solr 6.4 instance on windows server (windows
> > server
> > 2012 R2 standard),
> > Java v8, (build 1.8.0_121-b13).
> >
> > All works more or less ok, except MS Visio vsdx files indexing.
> >
> >
> > Every time it throws an error (no matters if it tries to index vsdx
> > file or for example docx with visio diagram inside).
> >
> > Thx in advance for your help. If you need some additional 

Re: Switching from Managed Schema to Manually Edited schema.xml --IS NOT WORKING

2017-02-05 Thread Erick Erickson
This is still using the managed schema specifically the
data_driven_configs schema as evidenced by the
add-unknown-field-to-the-schema part of the URL.

It looks like you're not _really_ removing the managed schema
definitions from your solrconfig.xml. You must
1> change solrconfig.xml
2> push it to ZooKeeper
3> reload the collection

before the config changes actually take effect.

Best,
Erick

On Sun, Feb 5, 2017 at 9:05 PM, Anatharaman, Srinatha (Contractor)
 wrote:
> Hi ,
>
> I am indexing a Text document and followed the steps defined in below URL to 
> create the schema.xml
> https://cwiki.apache.org/confluence/display/solr/Schema+Factory+Definition+in+SolrConfig#SchemaFactoryDefinitioninSolrConfig-SwitchingfromManagedSchematoManuallyEditedschema.xml
>
> After making above changes, When I try to index the document using curl 
> command I get below error :
>
> 
> 
> 400 name="QTime">147 name="error-class">org.apache.solr.common.SolrException name="root-error-class">org.apache.solr.common.SolrException name="error-class">org.apache.solr.update.processor.DistributedUpdateProcessor$DistributedUpdatesAsyncException  
> name="root-error-class">org.apache.solr.update.processor.DistributedUpdateProcessor$DistributedUpdatesAsyncException  name="msg">Async exception during distributed update: Bad Request
>
>
>
> request: 
> http://165.137.46.219:8983/solr/gsearch_shard1_replica2/update?update.chain=add-unknown-fields-to-the-schemaupdate.distrib=TOLEADERdistrib.from=http%3A%2F%2F165.137.46.218%3A8983%2Fsolr%2Fgsearch_shard2_replica1%2Fwt=javabinversion=2  name="code">400
> 
>
> Could someone help me to resolve this issue,
> How do I create a schema.xml file for a text document(document content varies 
> for each files). I want to index entire document as whole and search on the 
> document content
>
> Thanks & Regards,
> ~Sri
>
>


Switching from Managed Schema to Manually Edited schema.xml --IS NOT WORKING

2017-02-05 Thread Anatharaman, Srinatha (Contractor)
Hi ,

I am indexing a Text document and followed the steps defined in below URL to 
create the schema.xml
https://cwiki.apache.org/confluence/display/solr/Schema+Factory+Definition+in+SolrConfig#SchemaFactoryDefinitioninSolrConfig-SwitchingfromManagedSchematoManuallyEditedschema.xml

After making above changes, When I try to index the document using curl command 
I get below error :



400147org.apache.solr.common.SolrExceptionorg.apache.solr.common.SolrExceptionorg.apache.solr.update.processor.DistributedUpdateProcessor$DistributedUpdatesAsyncExceptionorg.apache.solr.update.processor.DistributedUpdateProcessor$DistributedUpdatesAsyncExceptionAsync exception during distributed update: Bad Request



request: 
http://165.137.46.219:8983/solr/gsearch_shard1_replica2/update?update.chain=add-unknown-fields-to-the-schemaupdate.distrib=TOLEADERdistrib.from=http%3A%2F%2F165.137.46.218%3A8983%2Fsolr%2Fgsearch_shard2_replica1%2Fwt=javabinversion=2400


Could someone help me to resolve this issue,
How do I create a schema.xml file for a text document(document content varies 
for each files). I want to index entire document as whole and search on the 
document content

Thanks & Regards,
~Sri




?????? Migrate Documents to Another Collection

2017-02-05 Thread alias
Sorry, I may not be clear enough to express, I describe the following 
experimental steps:
Step 1: Create two collections
Http://SOLR:8081/solr/admin/collections?action=CREATE=c1=3=2=3=myconf
Http://SOLR:8081/solr/admin/collections?action=CREATE=c2=3=2=3=myconf


Step 2: import test data, I only imported in c1 inside the collection, the data 
are as follows
"response":{"numFound":5,"start":0,"maxScore":1.0,"docs":[
  {
"id":"aa!c10",
"rowType":"like",
"title":["vip a red suit0"],
"description":["Your friend is your needs answered0"],
"_version_":1558553792955285504},
  {
"id":"bb!c11",
"rowType":"like",
"title":["vip a red suit1"],
"description":["Your friend is your needs answered1"],
"_version_":1558553792967868416},
  {
"id":"aa!c12",
"rowType":"like",
"title":["vip a red suit2"],
"description":["Your friend is your needs answered2"],
"_version_":1558553792968916992},
  {
"id":"bb!c13",
"rowType":"like",
"title":["vip a red suit3"],
"description":["Your friend is your needs answered3"],
"_version_":1558553792969965568},
  {
"id":"aa!c14",
"rowType":"like",
"title":["vip a red suit4"],
"description":["Your friend is your needs answered4"],
"_version_":1558553792971014144}]




Step 3: to achieve the merger order, I just want to have id 'aa' at the 
beginning of the data mobile past
Http://SOLR:8081/solr/admin/collections?action=MIGRATE=c1=aa!=c2



In the zookeeper C1 state.json has the following parameters:
 "RoutingRules": {"aa!": {
"RouteRanges": "3710-3710",
"TargetCollection": "c2",
"ExpireAt": "1486353350933"}}



After the implementation of the third step, c1 data has not moved to c2 inside, 
c2 data is empty, which is why, is it where I operate incorrect? 

thinks all!




--  --
??: "Damien Kamerman";;
: 2017??2??6??(??) 11:33
??: "solr-user"; 

: Re: Migrate Documents to Another Collection



Try with split.key=!
This will migrate all docs.

On 6 February 2017 at 14:31, alias <524839...@qq.com> wrote:

> I use this command,but not effect??  http://localhost:8081/solr/
> admin/collections?action=MIGRATE=c1
> key=c1_=c2,
>
>
>
> --  --
> ??: "Erick Erickson";
> : 2017??2??6??(??) 11:24
> ??: "solr-user";
> : Re: Migrate Documents to Another Collection
>
>
>
> I do not understand the problem. The http command you've shown is
> simply creating a collection. What does that have to do with migrating
> from c1 to c2? In fact, it is recreating c1. Assuming you haven't
> redefined the , then the router field defaults to "id". So
> this is just recreating a plain-vanilla collection. If you already
> have a "c1" collection, I expect the above would simply fail.
>
> There's nothing indicating you tried to move docs from C1 to C2 as the
> title of this e-mail indicates. There's no magic here, Solr
> collections are completely independent of one another. If you want
> docs to be moved, _you_ have to move them.
>
> Best,
> Erick
>
>
>
> On Sun, Feb 5, 2017 at 6:20 PM, alias <524839...@qq.com> wrote:
> > hello,please help me look this question
> >
> >
> >
> > I have a solr collections on the merger, we would like to ask the next
> question is as follows I have two collections, c1 and c2,
> >
> > C1 colleciton there are 10 data, id is from c1_0 to c1_9,
> >
> > C2 colleciton also has 10 data, id is from c2_0 to c2_9,
> >
> > I now want to c1 id c1_ format data into the c2, I implemented the
> following order, it seems no effect, and why?
> >
> > I c1 designated in the new router.field=id
> >
> > http://localhost:8081/solr/admin/collections?action=
> CREATEname=c1numShards=3=3=3&
> collection.configName=myconfrouter.field=id
> >
> > I refer to https://cwiki.apache.org/confluence/display/solr/
> Collections+API#CollectionsAPI-api12
> >
> > Solr version 6.3.0
> >
> > I have a problem? Or understanding wrong?
>

Re: Migrate Documents to Another Collection

2017-02-05 Thread Damien Kamerman
Try with split.key=!
This will migrate all docs.

On 6 February 2017 at 14:31, alias <524839...@qq.com> wrote:

> I use this command,but not effect:  http://localhost:8081/solr/
> admin/collections?action=MIGRATE=c1
> key=c1_=c2,
>
>
>
> -- 原始邮件 --
> 发件人: "Erick Erickson";
> 发送时间: 2017年2月6日(星期一) 中午11:24
> 收件人: "solr-user";
> 主题: Re: Migrate Documents to Another Collection
>
>
>
> I do not understand the problem. The http command you've shown is
> simply creating a collection. What does that have to do with migrating
> from c1 to c2? In fact, it is recreating c1. Assuming you haven't
> redefined the , then the router field defaults to "id". So
> this is just recreating a plain-vanilla collection. If you already
> have a "c1" collection, I expect the above would simply fail.
>
> There's nothing indicating you tried to move docs from C1 to C2 as the
> title of this e-mail indicates. There's no magic here, Solr
> collections are completely independent of one another. If you want
> docs to be moved, _you_ have to move them.
>
> Best,
> Erick
>
>
>
> On Sun, Feb 5, 2017 at 6:20 PM, alias <524839...@qq.com> wrote:
> > hello,please help me look this question
> >
> >
> >
> > I have a solr collections on the merger, we would like to ask the next
> question is as follows I have two collections, c1 and c2,
> >
> > C1 colleciton there are 10 data, id is from c1_0 to c1_9,
> >
> > C2 colleciton also has 10 data, id is from c2_0 to c2_9,
> >
> > I now want to c1 id c1_ format data into the c2, I implemented the
> following order, it seems no effect, and why?
> >
> > I c1 designated in the new router.field=id
> >
> > http://localhost:8081/solr/admin/collections?action=
> CREATEname=c1numShards=3=3=3&
> collection.configName=myconfrouter.field=id
> >
> > I refer to https://cwiki.apache.org/confluence/display/solr/
> Collections+API#CollectionsAPI-api12
> >
> > Solr version 6.3.0
> >
> > I have a problem? Or understanding wrong?
>


?????? Migrate Documents to Another Collection

2017-02-05 Thread alias
I use this command,but not effect??  
http://localhost:8081/solr/admin/collections?action=MIGRATE=c1=c1_=c2,



--  --
??: "Erick Erickson"; 
: 2017??2??6??(??) 11:24
??: "solr-user"; 
: Re: Migrate Documents to Another Collection



I do not understand the problem. The http command you've shown is
simply creating a collection. What does that have to do with migrating
from c1 to c2? In fact, it is recreating c1. Assuming you haven't
redefined the , then the router field defaults to "id". So
this is just recreating a plain-vanilla collection. If you already
have a "c1" collection, I expect the above would simply fail.

There's nothing indicating you tried to move docs from C1 to C2 as the
title of this e-mail indicates. There's no magic here, Solr
collections are completely independent of one another. If you want
docs to be moved, _you_ have to move them.

Best,
Erick



On Sun, Feb 5, 2017 at 6:20 PM, alias <524839...@qq.com> wrote:
> hello,please help me look this question
>
>
>
> I have a solr collections on the merger, we would like to ask the next 
> question is as follows I have two collections, c1 and c2,
>
> C1 colleciton there are 10 data, id is from c1_0 to c1_9,
>
> C2 colleciton also has 10 data, id is from c2_0 to c2_9,
>
> I now want to c1 id c1_ format data into the c2, I implemented the following 
> order, it seems no effect, and why?
>
> I c1 designated in the new router.field=id
>
> http://localhost:8081/solr/admin/collections?action=CREATEname=c1numShards=3=3=3=myconfrouter.field=id
>
> I refer to 
> https://cwiki.apache.org/confluence/display/solr/Collections+API#CollectionsAPI-api12
>
> Solr version 6.3.0
>
> I have a problem? Or understanding wrong?

Re: Migrate Documents to Another Collection

2017-02-05 Thread Erick Erickson
I do not understand the problem. The http command you've shown is
simply creating a collection. What does that have to do with migrating
from c1 to c2? In fact, it is recreating c1. Assuming you haven't
redefined the , then the router field defaults to "id". So
this is just recreating a plain-vanilla collection. If you already
have a "c1" collection, I expect the above would simply fail.

There's nothing indicating you tried to move docs from C1 to C2 as the
title of this e-mail indicates. There's no magic here, Solr
collections are completely independent of one another. If you want
docs to be moved, _you_ have to move them.

Best,
Erick



On Sun, Feb 5, 2017 at 6:20 PM, alias <524839...@qq.com> wrote:
> hello,please help me look this question
>
>
>
> I have a solr collections on the merger, we would like to ask the next 
> question is as follows I have two collections, c1 and c2,
>
> C1 colleciton there are 10 data, id is from c1_0 to c1_9,
>
> C2 colleciton also has 10 data, id is from c2_0 to c2_9,
>
> I now want to c1 id c1_ format data into the c2, I implemented the following 
> order, it seems no effect, and why?
>
> I c1 designated in the new router.field=id
>
> http://localhost:8081/solr/admin/collections?action=CREATE=c1=3=3=3=myconf=id
>
> I refer to 
> https://cwiki.apache.org/confluence/display/solr/Collections+API#CollectionsAPI-api12
>
> Solr version 6.3.0
>
> I have a problem? Or understanding wrong?


Re: Find groups where at least one item matches a query

2017-02-05 Thread Joel Bernstein
Take a look at the graph expressions:

https://cwiki.apache.org/confluence/display/solr/Graph+Traversal

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

On Sun, Feb 5, 2017 at 3:43 PM, Alexandre Rafalovitch 
wrote:

> What about collapse and expand with overriden query. Something like
> this (against 6.4 techproducts example):
> http://localhost:8983/solr/techproducts/select?expand.q=*
> :*=true={!collapse%20field=manu_id_s}=on&
> q=name:CORSAIR=json
>
> Note that the main document area contains the head document and the
> expanded area contains the rest of them, up to provided/default limit.
> For further info, see
> https://cwiki.apache.org/confluence/display/solr/
> Collapse+and+Expand+Results
>
> Regards,
>Alex.
> 
> http://www.solr-start.com/ - Resources for Solr users, new and experienced
>
>
> On 5 February 2017 at 14:55, Cristian Popovici
>  wrote:
> > Doesn't seem to work - I'm doing a query like this and I get only one
> result
> >
> > q=pathology:normal=true=groupId&*group.limit=2*
> >
> > On Sun, Feb 5, 2017 at 7:20 PM, Nick Vasilyev 
> > wrote:
> >
> >> Check out the group.limit argument.
> >>
> >> On Feb 5, 2017 12:10 PM, "Cristian Popovici" <
> cristi.popov...@visionsr.com
> >> >
> >> wrote:
> >>
> >> > Erick, thanks for you answer.
> >> >
> >> > Sorry - I forgot to mention that I do not know the group id when I
> >> perform
> >> > the query.
> >> > Grouping - I think - does not help for me as it filters out the
> documents
> >> > that do not meet the filter criteria.
> >> >
> >> > Example:
> >> > *q=pathology:Normal=true=groupId*  will miss out
> the
> >> > "pathology":
> >> > "Metastasis".
> >> >
> >> > I need to retrieve both documents in the same group even if only one
> >> meets
> >> > the search criteria.
> >> >
> >> > Thanks!
> >> >
> >> > On Sun, Feb 5, 2017 at 6:54 PM, Erick Erickson <
> erickerick...@gmail.com>
> >> > wrote:
> >> >
> >> > > Isn't this just "=groupId:223"?
> >> > >
> >> > > Or do you mean you need multiple _groups_? In which case you can use
> >> > > grouping, see:
> >> > > https://cwiki.apache.org/confluence/display/solr/
> >> > > Collapse+and+Expand+Results
> >> > > and/or
> >> > > https://cwiki.apache.org/confluence/display/solr/Result+Grouping
> >> > >
> >> > > but do note there are some limitations in distributed mode.
> >> > >
> >> > > Best,
> >> > > Erick
> >> > >
> >> > > On Sun, Feb 5, 2017 at 1:49 AM, Cristian Popovici
> >> > >  wrote:
> >> > > > Hi all,
> >> > > >
> >> > > > I'm new to Solr and I need a bit of help.
> >> > > >
> >> > > > I have a structure of documents indexed in Solr that are grouped
> >> > together
> >> > > > by a property. I need to retrieve all groups where at least one
> entry
> >> > in
> >> > > > the group matches a query.
> >> > > >
> >> > > > Example:
> >> > > > I have two documents indexed and both share the *groupId *property
> >> that
> >> > > > defines the grouping field.
> >> > > >
> >> > > > *{*
> >> > > > *"groupId": "223",*
> >> > > > *"modality": "Computed Tomography",*
> >> > > > *"anatomy": "Subcutaneous fat",*
> >> > > > *"pathology": "Metastasis",*
> >> > > > *}*
> >> > > >
> >> > > > *{*
> >> > > > *"groupId": "223",*
> >> > > > *"modality": "Computed Tomography",*
> >> > > > *"anatomy": "Subcutaneous fat",*
> >> > > > *"pathology": "Normal",*
> >> > > > *}*
> >> > > >
> >> > > > I need to retrieve both entries in the group when performing a
> query
> >> > > like:
> >> > > >
> >> > > > *(pathology:Normal)*
> >> > > > Is this possible in solr?
> >> > > >
> >> > > > Thanks!
> >> > >
> >> >
> >>
>


Re: backward compatibility of Solr 6.3 version with old Sol4j clients

2017-02-05 Thread Damien Kamerman
Regarding CloudSolrServer, I tried this briefly and found the client was
only aware of the old shared clusterstate.json.

On 4 February 2017 at 06:23, Shawn Heisey  wrote:

> On 2/3/2017 10:12 AM, Suresh Pendap wrote:
> > Will Solrj client 4.10.3 version work with Solr 6.3 version of the
> > server? I was trying to look up the documentation but no where the
> > compatibility matrix between server and client is provided. Has some
> > one already used this combination?
>
> If it's HttpSolrServer (HttpSolrClient in newer versions), chances are
> good that it will work.  The basic http API in Solr does not change
> quickly.  If you run into problems, provide detailed information here or
> on the IRC channel and we'll try to help you work through them.
>
> I have done quite a bit of version mismatching with the http client.
> Currently I have code with the 6.x client that connects to 4.x, 5.x, and
> 6.x servers.  I have also used older clients with newer servers and had
> no issues.
>
> If it's CloudSolrServer (CloudSolrClient in newer versions), I wouldn't
> even try to make it work with that wide a version discrepancy.
> SolrCloud has evolved so rapidly over the last couple of years that
> connecting different client and server versions may not work at all.
> For best compatibility, they should be identical versions.  If they
> aren't, SolrJ should be newer than Solr, be from the same major version,
> and not be offset by more than one or two minor releases.
>
> Thanks,
> Shawn
>
>


Re: Query/Field Index Analysis corrected but return no docs in search

2017-02-05 Thread Koji Sekiguchi

Hi Peter,

I'm not sure if I can correctly see the result you attached, I think it sounds 
reasonable to me
that you couldn't get search result, because your query 均匀肤色 is used as it is 
without
being analyzed whereas the same string 均匀肤色 is tokenized as 均匀 匀肤 肤色 in the 
index.

So it is obvious that tokenizers you're using in indexing and querying time 
don't match.
Please check what tokenizers you're using in your schema.xml.

Thanks,

koji


On 2017/02/04 23:18, Peter Liu wrote:

hi all:
   I was using solr 3.6 and tried to solve a recall-problem today , but 
encountered a weird problem.

   There's doc with field value : 均匀肤色, (just treated that word as a symbol if 
you don't know
it, I just want to describe the problem as exact as possible).


   And below was the analysis result ( tokenization) :

  Inline image 2

  ( and text-version if need.


  Index Analyzer

均匀肤色均匀  匀肤  肤色

均匀肤色均匀  匀肤  肤色

均匀肤色均匀  匀肤  肤色


  Query Analyzer

均匀肤色

均匀肤色

均匀肤色

均匀肤色



​ The tokenization result indicate the query will recall/hit the doc 
​undoubtedly. But the doc did
not appear in the result if I search with "均匀肤色". I tried to simplify the 
qf/bf/fq/q, just test
it with single field and single document, to make sure it was not caused by 
other problems but failed.


​It's knotty to debug because it only reproduced in
​
​product environments, I tried same config/index/query but not produce in dev 
​environment. I'm here
ask for helps if you met similar problem, or any clues/debug-method will be 
really helped.




Migrate Documents to Another Collection

2017-02-05 Thread alias
hello,please help me look this question 



I have a solr collections on the merger, we would like to ask the next question 
is as follows I have two collections, c1 and c2,

C1 colleciton there are 10 data, id is from c1_0 to c1_9,

C2 colleciton also has 10 data, id is from c2_0 to c2_9,

I now want to c1 id c1_ format data into the c2, I implemented the following 
order, it seems no effect, and why?

I c1 designated in the new router.field=id

http://localhost:8081/solr/admin/collections?action=CREATE=c1=3=3=3=myconf=id

I refer to 
https://cwiki.apache.org/confluence/display/solr/Collections+API#CollectionsAPI-api12

Solr version 6.3.0

I have a problem? Or understanding wrong?

回复: bin/post and self-signed SSL

2017-02-05 Thread alias
You mean this can only be used in this version 5.5.x? Other versions invalid?




-- 原始邮件 --
发件人: "Kevin Risden";;
发送时间: 2017年2月6日(星期一) 上午9:44
收件人: "solr-user"; 

主题: Re: bin/post and self-signed SSL



Originally formatted as MarkDown. This was tested against Solr 5.5.x
packaged as Lucidworks HDP Search. It would be the same as Solr 5.5.x.

# Using Solr
*
https://cwiki.apache.org/confluence/display/solr/Solr+Start+Script+Reference
* https://cwiki.apache.org/confluence/display/solr/Running+Solr
* https://cwiki.apache.org/confluence/display/solr/Collections+API

## Create collection (w/o Kerberos)
```bash
/opt/lucidworks-hdpsearch/solr/bin/solr create -c test
```

## Upload configuration directory (w/ SSL and Kerberos)
```bash
/opt/lucidworks-hdpsearch/solr/server/scripts/cloud-scripts/zkcli.sh
-zkhost ZK_CONNECTION_STRING -cmd upconfig -confname basic_config -confdir
/opt/lucidworks-hdpsearch/solr/server/solr/configsets/basic_configs/conf
```

## Create Collection (w/ SSL and Kerberos)
```bash
curl -k --negotiate -u : "
https://SOLR_HOST:8983/solr/admin/collections?action=CREATE=newCollection=1=1=basic_config
"
```

## Delete collection (w/o Kerberos)
```bash
/opt/lucidworks-hdpsearch/solr/bin/solr delete -c test
```

## Delete Collection (w/ SSL and Kerberos)
```bash
curl -k --negotiate -u : "
https://SOLR_HOST:8983/solr/admin/collections?action=DELETE=newCollection
"
```

## Adding some test docs (w/o SSL)
```bash
/opt/lucidworks-hdpsearch/solr/bin/post -c test
/opt/lucidworks-hdpsearch/solr/example/exampledocs/*.xml
```

## Adding documents (w/ SSL and Kerberos)
```bash
curl -k --negotiate -u : "
https://SOLR_HOST:8983/solr/newCollection/update?commit=true; -H
"Content-Type: application/json" --data-binary
@/opt/lucidworks-hdpsearch/solr/example/exampledocs/books.json
```

## List Collections (w/ SSL and Kerberos)
```bash
curl -k --negotiate -u : "
https://SOLR_HOST:8983/solr/admin/collections?action=LIST;
```

Kevin Risden

On Sun, Feb 5, 2017 at 5:55 PM, Kevin Risden 
wrote:

> Last time I looked at this, there was no way to pass any Java properties
> to the bin/post command. This made it impossible to even set the SSL
> properties manually. I checked master just now and still there is no place
> to enter Java properties that would make it to the Java command.
>
> I came up with a chart of commands previously that worked with standard
> (no SSL or Kerberos), SSL only, and SSL with Kerberos. Only the standard
> solr setup worked for the bin/solr and bin/post commands. Errors popped up
> that I couldn't work around. I've been meaning to get back to it just
> haven't had a chance.
>
> I'll try to share that info when I get back to my laptop.
>
> Kevin Risden
>
> On Feb 5, 2017 12:31, "Jan Høydahl"  wrote:
>
>> Hi,
>>
>> I’m trying to post a document to Solr using bin/post after enabling SSL
>> with self signed certificate. Result is:
>>
>> $ post -url https://localhost:8983/solr/sslColl *.html
>> /usr/lib/jvm/java-8-openjdk-amd64/bin/java -classpath
>> /opt/solr/dist/solr-core-6.4.0.jar -Dauto=yes -Durl=
>> https://localhost:8983/solr/sslColl -Dc= -Ddata=files
>> org.apache.solr.util.SimplePostTool lab-index.html lab-ops1.html
>> lab-ops2.html lab-ops3.html lab-ops4.html lab-ops6.html lab-ops8.html
>> SimplePostTool version 5.0.0
>> Posting files to [base] url https://localhost:8983/solr/sslColl...
>> Entering auto mode. File endings considered are
>> xml,json,jsonl,csv,pdf,doc,docx,ppt,pptx,xls,xlsx,odt,odp,
>> ods,ott,otp,ots,rtf,htm,html,txt,log
>> POSTing file lab-index.html (text/html) to [base]/extract
>> SimplePostTool: FATAL: Connection error (is Solr running at
>> https://localhost:8983/solr/sslColl ?): javax.net.ssl.SSLHandshakeException:
>> sun.security.validator.ValidatorException: PKIX path building failed:
>> sun.security.provider.certpath.SunCertPathBuilderException: unable to
>> find valid certification path to requested target
>>
>>
>> Do anyone know a workaround for letting bin/post accept self-signed cert?
>> Have not tested it against a CA signed Solr...
>>
>> --
>> Jan Høydahl, search solution architect
>> Cominvent AS - www.cominvent.com
>>
>>

Re: bin/post and self-signed SSL

2017-02-05 Thread Kevin Risden
Originally formatted as MarkDown. This was tested against Solr 5.5.x
packaged as Lucidworks HDP Search. It would be the same as Solr 5.5.x.

# Using Solr
*
https://cwiki.apache.org/confluence/display/solr/Solr+Start+Script+Reference
* https://cwiki.apache.org/confluence/display/solr/Running+Solr
* https://cwiki.apache.org/confluence/display/solr/Collections+API

## Create collection (w/o Kerberos)
```bash
/opt/lucidworks-hdpsearch/solr/bin/solr create -c test
```

## Upload configuration directory (w/ SSL and Kerberos)
```bash
/opt/lucidworks-hdpsearch/solr/server/scripts/cloud-scripts/zkcli.sh
-zkhost ZK_CONNECTION_STRING -cmd upconfig -confname basic_config -confdir
/opt/lucidworks-hdpsearch/solr/server/solr/configsets/basic_configs/conf
```

## Create Collection (w/ SSL and Kerberos)
```bash
curl -k --negotiate -u : "
https://SOLR_HOST:8983/solr/admin/collections?action=CREATE=newCollection=1=1=basic_config
"
```

## Delete collection (w/o Kerberos)
```bash
/opt/lucidworks-hdpsearch/solr/bin/solr delete -c test
```

## Delete Collection (w/ SSL and Kerberos)
```bash
curl -k --negotiate -u : "
https://SOLR_HOST:8983/solr/admin/collections?action=DELETE=newCollection
"
```

## Adding some test docs (w/o SSL)
```bash
/opt/lucidworks-hdpsearch/solr/bin/post -c test
/opt/lucidworks-hdpsearch/solr/example/exampledocs/*.xml
```

## Adding documents (w/ SSL and Kerberos)
```bash
curl -k --negotiate -u : "
https://SOLR_HOST:8983/solr/newCollection/update?commit=true; -H
"Content-Type: application/json" --data-binary
@/opt/lucidworks-hdpsearch/solr/example/exampledocs/books.json
```

## List Collections (w/ SSL and Kerberos)
```bash
curl -k --negotiate -u : "
https://SOLR_HOST:8983/solr/admin/collections?action=LIST;
```

Kevin Risden

On Sun, Feb 5, 2017 at 5:55 PM, Kevin Risden 
wrote:

> Last time I looked at this, there was no way to pass any Java properties
> to the bin/post command. This made it impossible to even set the SSL
> properties manually. I checked master just now and still there is no place
> to enter Java properties that would make it to the Java command.
>
> I came up with a chart of commands previously that worked with standard
> (no SSL or Kerberos), SSL only, and SSL with Kerberos. Only the standard
> solr setup worked for the bin/solr and bin/post commands. Errors popped up
> that I couldn't work around. I've been meaning to get back to it just
> haven't had a chance.
>
> I'll try to share that info when I get back to my laptop.
>
> Kevin Risden
>
> On Feb 5, 2017 12:31, "Jan Høydahl"  wrote:
>
>> Hi,
>>
>> I’m trying to post a document to Solr using bin/post after enabling SSL
>> with self signed certificate. Result is:
>>
>> $ post -url https://localhost:8983/solr/sslColl *.html
>> /usr/lib/jvm/java-8-openjdk-amd64/bin/java -classpath
>> /opt/solr/dist/solr-core-6.4.0.jar -Dauto=yes -Durl=
>> https://localhost:8983/solr/sslColl -Dc= -Ddata=files
>> org.apache.solr.util.SimplePostTool lab-index.html lab-ops1.html
>> lab-ops2.html lab-ops3.html lab-ops4.html lab-ops6.html lab-ops8.html
>> SimplePostTool version 5.0.0
>> Posting files to [base] url https://localhost:8983/solr/sslColl...
>> Entering auto mode. File endings considered are
>> xml,json,jsonl,csv,pdf,doc,docx,ppt,pptx,xls,xlsx,odt,odp,
>> ods,ott,otp,ots,rtf,htm,html,txt,log
>> POSTing file lab-index.html (text/html) to [base]/extract
>> SimplePostTool: FATAL: Connection error (is Solr running at
>> https://localhost:8983/solr/sslColl ?): javax.net.ssl.SSLHandshakeException:
>> sun.security.validator.ValidatorException: PKIX path building failed:
>> sun.security.provider.certpath.SunCertPathBuilderException: unable to
>> find valid certification path to requested target
>>
>>
>> Do anyone know a workaround for letting bin/post accept self-signed cert?
>> Have not tested it against a CA signed Solr...
>>
>> --
>> Jan Høydahl, search solution architect
>> Cominvent AS - www.cominvent.com
>>
>>


Migrate Documents to Another Collection

2017-02-05 Thread alias
hello,please help me look this question 
"https://issues.apache.org/jira/browse/SOLR-10097;

Re: bin/post and self-signed SSL

2017-02-05 Thread Kevin Risden
Last time I looked at this, there was no way to pass any Java properties to
the bin/post command. This made it impossible to even set the SSL
properties manually. I checked master just now and still there is no place
to enter Java properties that would make it to the Java command.

I came up with a chart of commands previously that worked with standard (no
SSL or Kerberos), SSL only, and SSL with Kerberos. Only the standard solr
setup worked for the bin/solr and bin/post commands. Errors popped up that
I couldn't work around. I've been meaning to get back to it just haven't
had a chance.

I'll try to share that info when I get back to my laptop.

Kevin Risden

On Feb 5, 2017 12:31, "Jan Høydahl"  wrote:

> Hi,
>
> I’m trying to post a document to Solr using bin/post after enabling SSL
> with self signed certificate. Result is:
>
> $ post -url https://localhost:8983/solr/sslColl *.html
> /usr/lib/jvm/java-8-openjdk-amd64/bin/java -classpath
> /opt/solr/dist/solr-core-6.4.0.jar -Dauto=yes -Durl=
> https://localhost:8983/solr/sslColl -Dc= -Ddata=files
> org.apache.solr.util.SimplePostTool lab-index.html lab-ops1.html
> lab-ops2.html lab-ops3.html lab-ops4.html lab-ops6.html lab-ops8.html
> SimplePostTool version 5.0.0
> Posting files to [base] url https://localhost:8983/solr/sslColl...
> Entering auto mode. File endings considered are xml,json,jsonl,csv,pdf,doc,
> docx,ppt,pptx,xls,xlsx,odt,odp,ods,ott,otp,ots,rtf,htm,html,txt,log
> POSTing file lab-index.html (text/html) to [base]/extract
> SimplePostTool: FATAL: Connection error (is Solr running at
> https://localhost:8983/solr/sslColl ?): javax.net.ssl.SSLHandshakeException:
> sun.security.validator.ValidatorException: PKIX path building failed:
> sun.security.provider.certpath.SunCertPathBuilderException: unable to
> find valid certification path to requested target
>
>
> Do anyone know a workaround for letting bin/post accept self-signed cert?
> Have not tested it against a CA signed Solr...
>
> --
> Jan Høydahl, search solution architect
> Cominvent AS - www.cominvent.com
>
>


Re: Find groups where at least one item matches a query

2017-02-05 Thread Alexandre Rafalovitch
What about collapse and expand with overriden query. Something like
this (against 6.4 techproducts example):
http://localhost:8983/solr/techproducts/select?expand.q=*:*=true={!collapse%20field=manu_id_s}=on=name:CORSAIR=json

Note that the main document area contains the head document and the
expanded area contains the rest of them, up to provided/default limit.
For further info, see
https://cwiki.apache.org/confluence/display/solr/Collapse+and+Expand+Results

Regards,
   Alex.

http://www.solr-start.com/ - Resources for Solr users, new and experienced


On 5 February 2017 at 14:55, Cristian Popovici
 wrote:
> Doesn't seem to work - I'm doing a query like this and I get only one result
>
> q=pathology:normal=true=groupId&*group.limit=2*
>
> On Sun, Feb 5, 2017 at 7:20 PM, Nick Vasilyev 
> wrote:
>
>> Check out the group.limit argument.
>>
>> On Feb 5, 2017 12:10 PM, "Cristian Popovici" > >
>> wrote:
>>
>> > Erick, thanks for you answer.
>> >
>> > Sorry - I forgot to mention that I do not know the group id when I
>> perform
>> > the query.
>> > Grouping - I think - does not help for me as it filters out the documents
>> > that do not meet the filter criteria.
>> >
>> > Example:
>> > *q=pathology:Normal=true=groupId*  will miss out the
>> > "pathology":
>> > "Metastasis".
>> >
>> > I need to retrieve both documents in the same group even if only one
>> meets
>> > the search criteria.
>> >
>> > Thanks!
>> >
>> > On Sun, Feb 5, 2017 at 6:54 PM, Erick Erickson 
>> > wrote:
>> >
>> > > Isn't this just "=groupId:223"?
>> > >
>> > > Or do you mean you need multiple _groups_? In which case you can use
>> > > grouping, see:
>> > > https://cwiki.apache.org/confluence/display/solr/
>> > > Collapse+and+Expand+Results
>> > > and/or
>> > > https://cwiki.apache.org/confluence/display/solr/Result+Grouping
>> > >
>> > > but do note there are some limitations in distributed mode.
>> > >
>> > > Best,
>> > > Erick
>> > >
>> > > On Sun, Feb 5, 2017 at 1:49 AM, Cristian Popovici
>> > >  wrote:
>> > > > Hi all,
>> > > >
>> > > > I'm new to Solr and I need a bit of help.
>> > > >
>> > > > I have a structure of documents indexed in Solr that are grouped
>> > together
>> > > > by a property. I need to retrieve all groups where at least one entry
>> > in
>> > > > the group matches a query.
>> > > >
>> > > > Example:
>> > > > I have two documents indexed and both share the *groupId *property
>> that
>> > > > defines the grouping field.
>> > > >
>> > > > *{*
>> > > > *"groupId": "223",*
>> > > > *"modality": "Computed Tomography",*
>> > > > *"anatomy": "Subcutaneous fat",*
>> > > > *"pathology": "Metastasis",*
>> > > > *}*
>> > > >
>> > > > *{*
>> > > > *"groupId": "223",*
>> > > > *"modality": "Computed Tomography",*
>> > > > *"anatomy": "Subcutaneous fat",*
>> > > > *"pathology": "Normal",*
>> > > > *}*
>> > > >
>> > > > I need to retrieve both entries in the group when performing a query
>> > > like:
>> > > >
>> > > > *(pathology:Normal)*
>> > > > Is this possible in solr?
>> > > >
>> > > > Thanks!
>> > >
>> >
>>


Re: Find groups where at least one item matches a query

2017-02-05 Thread Cristian Popovici
Doesn't seem to work - I'm doing a query like this and I get only one result

q=pathology:normal=true=groupId&*group.limit=2*

On Sun, Feb 5, 2017 at 7:20 PM, Nick Vasilyev 
wrote:

> Check out the group.limit argument.
>
> On Feb 5, 2017 12:10 PM, "Cristian Popovici"  >
> wrote:
>
> > Erick, thanks for you answer.
> >
> > Sorry - I forgot to mention that I do not know the group id when I
> perform
> > the query.
> > Grouping - I think - does not help for me as it filters out the documents
> > that do not meet the filter criteria.
> >
> > Example:
> > *q=pathology:Normal=true=groupId*  will miss out the
> > "pathology":
> > "Metastasis".
> >
> > I need to retrieve both documents in the same group even if only one
> meets
> > the search criteria.
> >
> > Thanks!
> >
> > On Sun, Feb 5, 2017 at 6:54 PM, Erick Erickson 
> > wrote:
> >
> > > Isn't this just "=groupId:223"?
> > >
> > > Or do you mean you need multiple _groups_? In which case you can use
> > > grouping, see:
> > > https://cwiki.apache.org/confluence/display/solr/
> > > Collapse+and+Expand+Results
> > > and/or
> > > https://cwiki.apache.org/confluence/display/solr/Result+Grouping
> > >
> > > but do note there are some limitations in distributed mode.
> > >
> > > Best,
> > > Erick
> > >
> > > On Sun, Feb 5, 2017 at 1:49 AM, Cristian Popovici
> > >  wrote:
> > > > Hi all,
> > > >
> > > > I'm new to Solr and I need a bit of help.
> > > >
> > > > I have a structure of documents indexed in Solr that are grouped
> > together
> > > > by a property. I need to retrieve all groups where at least one entry
> > in
> > > > the group matches a query.
> > > >
> > > > Example:
> > > > I have two documents indexed and both share the *groupId *property
> that
> > > > defines the grouping field.
> > > >
> > > > *{*
> > > > *"groupId": "223",*
> > > > *"modality": "Computed Tomography",*
> > > > *"anatomy": "Subcutaneous fat",*
> > > > *"pathology": "Metastasis",*
> > > > *}*
> > > >
> > > > *{*
> > > > *"groupId": "223",*
> > > > *"modality": "Computed Tomography",*
> > > > *"anatomy": "Subcutaneous fat",*
> > > > *"pathology": "Normal",*
> > > > *}*
> > > >
> > > > I need to retrieve both entries in the group when performing a query
> > > like:
> > > >
> > > > *(pathology:Normal)*
> > > > Is this possible in solr?
> > > >
> > > > Thanks!
> > >
> >
>


bin/post and self-signed SSL

2017-02-05 Thread Jan Høydahl
Hi,

I’m trying to post a document to Solr using bin/post after enabling SSL with 
self signed certificate. Result is:

$ post -url https://localhost:8983/solr/sslColl *.html
/usr/lib/jvm/java-8-openjdk-amd64/bin/java -classpath 
/opt/solr/dist/solr-core-6.4.0.jar -Dauto=yes 
-Durl=https://localhost:8983/solr/sslColl -Dc= -Ddata=files 
org.apache.solr.util.SimplePostTool lab-index.html lab-ops1.html lab-ops2.html 
lab-ops3.html lab-ops4.html lab-ops6.html lab-ops8.html
SimplePostTool version 5.0.0
Posting files to [base] url https://localhost:8983/solr/sslColl...
Entering auto mode. File endings considered are 
xml,json,jsonl,csv,pdf,doc,docx,ppt,pptx,xls,xlsx,odt,odp,ods,ott,otp,ots,rtf,htm,html,txt,log
POSTing file lab-index.html (text/html) to [base]/extract
SimplePostTool: FATAL: Connection error (is Solr running at 
https://localhost:8983/solr/sslColl ?): javax.net.ssl.SSLHandshakeException: 
sun.security.validator.ValidatorException: PKIX path building failed: 
sun.security.provider.certpath.SunCertPathBuilderException: unable to find 
valid certification path to requested target


Do anyone know a workaround for letting bin/post accept self-signed cert? Have 
not tested it against a CA signed Solr...

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



Re: Find groups where at least one item matches a query

2017-02-05 Thread Nick Vasilyev
Check out the group.limit argument.

On Feb 5, 2017 12:10 PM, "Cristian Popovici" 
wrote:

> Erick, thanks for you answer.
>
> Sorry - I forgot to mention that I do not know the group id when I perform
> the query.
> Grouping - I think - does not help for me as it filters out the documents
> that do not meet the filter criteria.
>
> Example:
> *q=pathology:Normal=true=groupId*  will miss out the
> "pathology":
> "Metastasis".
>
> I need to retrieve both documents in the same group even if only one meets
> the search criteria.
>
> Thanks!
>
> On Sun, Feb 5, 2017 at 6:54 PM, Erick Erickson 
> wrote:
>
> > Isn't this just "=groupId:223"?
> >
> > Or do you mean you need multiple _groups_? In which case you can use
> > grouping, see:
> > https://cwiki.apache.org/confluence/display/solr/
> > Collapse+and+Expand+Results
> > and/or
> > https://cwiki.apache.org/confluence/display/solr/Result+Grouping
> >
> > but do note there are some limitations in distributed mode.
> >
> > Best,
> > Erick
> >
> > On Sun, Feb 5, 2017 at 1:49 AM, Cristian Popovici
> >  wrote:
> > > Hi all,
> > >
> > > I'm new to Solr and I need a bit of help.
> > >
> > > I have a structure of documents indexed in Solr that are grouped
> together
> > > by a property. I need to retrieve all groups where at least one entry
> in
> > > the group matches a query.
> > >
> > > Example:
> > > I have two documents indexed and both share the *groupId *property that
> > > defines the grouping field.
> > >
> > > *{*
> > > *"groupId": "223",*
> > > *"modality": "Computed Tomography",*
> > > *"anatomy": "Subcutaneous fat",*
> > > *"pathology": "Metastasis",*
> > > *}*
> > >
> > > *{*
> > > *"groupId": "223",*
> > > *"modality": "Computed Tomography",*
> > > *"anatomy": "Subcutaneous fat",*
> > > *"pathology": "Normal",*
> > > *}*
> > >
> > > I need to retrieve both entries in the group when performing a query
> > like:
> > >
> > > *(pathology:Normal)*
> > > Is this possible in solr?
> > >
> > > Thanks!
> >
>


Re: Find groups where at least one item matches a query

2017-02-05 Thread Cristian Popovici
Erick, thanks for you answer.

Sorry - I forgot to mention that I do not know the group id when I perform
the query.
Grouping - I think - does not help for me as it filters out the documents
that do not meet the filter criteria.

Example:
*q=pathology:Normal=true=groupId*  will miss out the
"pathology":
"Metastasis".

I need to retrieve both documents in the same group even if only one meets
the search criteria.

Thanks!

On Sun, Feb 5, 2017 at 6:54 PM, Erick Erickson 
wrote:

> Isn't this just "=groupId:223"?
>
> Or do you mean you need multiple _groups_? In which case you can use
> grouping, see:
> https://cwiki.apache.org/confluence/display/solr/
> Collapse+and+Expand+Results
> and/or
> https://cwiki.apache.org/confluence/display/solr/Result+Grouping
>
> but do note there are some limitations in distributed mode.
>
> Best,
> Erick
>
> On Sun, Feb 5, 2017 at 1:49 AM, Cristian Popovici
>  wrote:
> > Hi all,
> >
> > I'm new to Solr and I need a bit of help.
> >
> > I have a structure of documents indexed in Solr that are grouped together
> > by a property. I need to retrieve all groups where at least one entry in
> > the group matches a query.
> >
> > Example:
> > I have two documents indexed and both share the *groupId *property that
> > defines the grouping field.
> >
> > *{*
> > *"groupId": "223",*
> > *"modality": "Computed Tomography",*
> > *"anatomy": "Subcutaneous fat",*
> > *"pathology": "Metastasis",*
> > *}*
> >
> > *{*
> > *"groupId": "223",*
> > *"modality": "Computed Tomography",*
> > *"anatomy": "Subcutaneous fat",*
> > *"pathology": "Normal",*
> > *}*
> >
> > I need to retrieve both entries in the group when performing a query
> like:
> >
> > *(pathology:Normal)*
> > Is this possible in solr?
> >
> > Thanks!
>


Re: Find groups where at least one item matches a query

2017-02-05 Thread Erick Erickson
Isn't this just "=groupId:223"?

Or do you mean you need multiple _groups_? In which case you can use
grouping, see:
https://cwiki.apache.org/confluence/display/solr/Collapse+and+Expand+Results
and/or
https://cwiki.apache.org/confluence/display/solr/Result+Grouping

but do note there are some limitations in distributed mode.

Best,
Erick

On Sun, Feb 5, 2017 at 1:49 AM, Cristian Popovici
 wrote:
> Hi all,
>
> I'm new to Solr and I need a bit of help.
>
> I have a structure of documents indexed in Solr that are grouped together
> by a property. I need to retrieve all groups where at least one entry in
> the group matches a query.
>
> Example:
> I have two documents indexed and both share the *groupId *property that
> defines the grouping field.
>
> *{*
> *"groupId": "223",*
> *"modality": "Computed Tomography",*
> *"anatomy": "Subcutaneous fat",*
> *"pathology": "Metastasis",*
> *}*
>
> *{*
> *"groupId": "223",*
> *"modality": "Computed Tomography",*
> *"anatomy": "Subcutaneous fat",*
> *"pathology": "Normal",*
> *}*
>
> I need to retrieve both entries in the group when performing a query like:
>
> *(pathology:Normal)*
> Is this possible in solr?
>
> Thanks!


Find groups where at least one item matches a query

2017-02-05 Thread Cristian Popovici
Hi all,

I'm new to Solr and I need a bit of help.

I have a structure of documents indexed in Solr that are grouped together
by a property. I need to retrieve all groups where at least one entry in
the group matches a query.

Example:
I have two documents indexed and both share the *groupId *property that
defines the grouping field.

*{*
*"groupId": "223",*
*"modality": "Computed Tomography",*
*"anatomy": "Subcutaneous fat",*
*"pathology": "Metastasis",*
*}*

*{*
*"groupId": "223",*
*"modality": "Computed Tomography",*
*"anatomy": "Subcutaneous fat",*
*"pathology": "Normal",*
*}*

I need to retrieve both entries in the group when performing a query like:

*(pathology:Normal)*
Is this possible in solr?

Thanks!