You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-dev@jackrabbit.apache.org by Tommaso Teofili <to...@gmail.com> on 2017/03/24 13:56:17 UTC
Re: problem on oak jcr sql2 query
It'd be helpful to also know the version of Oak and Solr you're using and,
possibly, sample content you expect the query to match.
Thanks,
Tommaso
Il giorno ven 24 mar 2017 alle ore 14:54 Thomas Mueller <mu...@adobe.com>
ha scritto:
> Could you post the index definition please?
>
>
> From: Ancona Francesco <Fr...@siav.it>
> Reply-To: "oak-dev@jackrabbit.apache.org" <oa...@jackrabbit.apache.org>
> Date: Thursday, 23 March 2017 at 15:19
> To: "oak-dev@jackrabbit.apache.org" <oa...@jackrabbit.apache.org>
> Cc: Diquigiovanni Simone <Si...@siav.it>
> Subject: problem on oak jcr sql2 query
>
> Hi all,
> we use SolrSrerver for fulltext searches; both on metadata both on content
> binary.
> In general i have to find all nodes nt:file that contain the word
> “company” or all nodes that have childs nt:resource that contain the same
> word.
>
> Unfortunately if upload e file (so a node that is a nt:resource) and i use
> this query
> SELECT p.* FROM [nt:file] as p where contains(p.*,''company ')
>
> Solr find result but the RowIterator doesn’t return anything.
>
> Instead the above query works
> SELECT p.* FROM [nt:resource] as p where contains(p.*,'company')
> But doesn’t find nt:file nodes
>
> Can you help me ?
>
> Thanks in advance.
>
>
> [cid:image002.png@01D2A3E8.D7747740]
> Francesco Ancona | Software Dev. Dept. (SP) - Software Architect
> tel. +39 049 8979797 <049%20897%209797> | fax +39 049 8978800
> <049%20897%208800> | cel. +39 3299060325 <329%20906%200325>
> e-mail: francesco.ancona@siav.it | www.siav.it<
> https://na01.safelinks.protection.outlook.com/?url=www.siav.it&data=02%7C01%7C%7Caed3cadf483741e2971708d471f7b284%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636258756051666135&sdata=GFXjC%2BgyoIh37AXmGYhYdORtXp1dFiA5v0hoghgbtBw%3D&reserved=0
> >
>
> I contenuti di questa e-mail e dei suoi allegati sono confidenziali e
> riservati esclusivamente ai destinatari.
> L'utilizzo per qualunque fine del presente messaggio e degli allegati così
> come la relativa divulgazione senza l'autorizzazione del mittente sono
> vietati.
> Se avete ricevuto questa e-mail per errore, vi preghiamo di distruggerla e
> di comunicarcelo.
> I dati personali sono trattati esclusivamente per le finalità della
> presente comunicazione in conformità con la legislazione vigente (D.lgs.
> 196/2003 "Codice Privacy").
> Per informazioni: SIAV S.p.A. – siav@siav.it – 049 8979797
> <049%20897%209797>
>
> The contents of this e-mail and its attachments are confidential and
> reserved exclusively to the recipients.
> The use for any purpose of this message and attachments as well as its
> disclosure without the consent of the sender is prohibited.
> If you have received this email in error, please destroy it and notify us.
> Personal data shall be processed solely for the purposes of this notice in
> accordance with current legislation (Legislative Decree no. 196/2003
> "Code").
> For more information: SIAV S.p.A. – siav@siav.it – 049 8979797
> <049%20897%209797>
>
>
R: problem on oak jcr sql2 query
Posted by Ancona Francesco <Fr...@siav.it>.
Hi all,
in red answers below.
Thanks in advance
best regards
-----Messaggio originale-----
Da: Tommaso Teofili [mailto:tommaso.teofili@gmail.com]
Inviato: martedì 28 marzo 2017 13:35
A: oak-dev@jackrabbit.apache.org
Cc: Diquigiovanni Simone <Si...@siav.it>
Oggetto: Re: problem on oak jcr sql2 query
Hi Francesco,
do you have other indexes within your Oak repo ?
No. We haven’t other indexes.
It might be that the query engine selects a different index which only acts on [nt:file] nodes.
You can try checking the plan [1] for your query and compare with the [nt:base] version.
It might also be useful to enable debug logging for org.apache.jackrabbit.oak.query, that will allow you to check the costs associated to each index so that it should be easier to eventually tweak the index definitions accordingly (note that the query engine selects the index with the lowest cost), e.g. you should see something like:
...
cost for solr is 1.4
cost for lucene is 1.2
cost for reference is Infinity
...
We have already activated debug in oak and we noticed that when we use a query with the inner join then cost for solr is Infinity and query is not sent to solr
Do you Know if inner join is supported by Oak to use Solr ?
Regards,
Tommaso
[1] :
http://jackrabbit.apache.org/oak/docs/query/query-troubleshooting.html#Query_Plan
Il giorno mar 28 mar 2017 alle ore 12:28 Ancona Francesco < Francesco.Ancona@siav.it<ma...@siav.it>> ha scritto:
> We have wrapped oak jcr implementation with our data model, so it's
> not so easy give you our unit test (our sw is not yet open sourece
> :-)) Besides we know the documenti is correctly indexed, cause we see
> it in solr; so you can use any type of pdf: oak manage full text correctly.
>
> Anyway we tried to use a query like this to optimize performance:
> SELECT parent.* FROM [nt:file] AS parent INNER JOIN [nt:resource] AS
> child ON ISCHILDNODE(child,parent) WHERE CONTAINS(child.*, ' company')
> or CONTAINS(parent.*, ' company')
>
> But we saw that index planner doesn't permit solr query (oak doesn't
> use solr for the query). So we can't find words inside content
> (nt:resource)
>
> What is wrong ?
> Why oak doesn't use solr for full text query ?
>
> Thanks in advance,
> best regards
>
> -----Messaggio originale-----
> Da: Tommaso Teofili [mailto:tommaso@apache.org]
> Inviato: martedì 28 marzo 2017 10:33
> A: oak-dev@jackrabbit.apache.org<ma...@jackrabbit.apache.org>
> Cc: Diquigiovanni Simone <Si...@siav.it>>
> Oggetto: Re: problem on oak jcr sql2 query
>
> Hi Francesco,
>
> Il giorno lun 27 mar 2017 alle ore 08:59 Ancona Francesco <
> Francesco.Ancona@siav.it<ma...@siav.it>> ha scritto:
>
> Sorry.
>
> We are using Oak 1.4.10 and solr 4.10.4
>
> i send you also a pdf example: the searched word is "sezione"
>
>
> attachments do not usually get through the mailing list therefore we
> can't look into it.
>
>
>
> In another document ([nt:file] that doesn't have childs) i'd want
> match only through metadata that contains the word "company"
>
> Actually i resolved the problem executing a query like this: select
> p.* from [nt:base] as p where ...... contains (p.*, "company") or
> contains (p.*, "sezione")
>
> Then i explore (programmatically and after the query response) jcr
> nodes to set only nodes that are [nt:file]
>
> Is it the correct approach ?
>
>
> this can work but it's surely worse in terms of performance as you
> retrieve and skip some docs you don't really need.
> If you can provide the PDF via a link or, better, a unit test we can
> probably help you more effectively.
>
> Regards,
> Tommaso
>
>
>
> Thanks in advance,
> best regards
>
> -----Messaggio originale-----
> Da: Tommaso Teofili [mailto:tommaso.teofili@gmail.com]
> Inviato: venerdì 24 marzo 2017 14:56
> A: oak-dev@jackrabbit.apache.org<ma...@jackrabbit.apache.org>
> Cc: Diquigiovanni Simone <Si...@siav.it>>
> Oggetto: Re: problem on oak jcr sql2 query
>
> It'd be helpful to also know the version of Oak and Solr you're using
> and, possibly, sample content you expect the query to match.
>
> Thanks,
> Tommaso
>
>
> Il giorno ven 24 mar 2017 alle ore 14:54 Thomas Mueller
> <mu...@adobe.com>> ha scritto:
>
> > Could you post the index definition please?
> >
> >
> > From: Ancona Francesco <Fr...@siav.it>>
> > Reply-To: "oak-dev@jackrabbit.apache.org<ma...@jackrabbit.apache.org>"
> > <oa...@jackrabbit.apache.org>>
> > Date: Thursday, 23 March 2017 at 15:19
> > To: "oak-dev@jackrabbit.apache.org<ma...@jackrabbit.apache.org>" <oa...@jackrabbit.apache.org>>
> > Cc: Diquigiovanni Simone <Si...@siav.it>>
> > Subject: problem on oak jcr sql2 query
> >
> > Hi all,
> > we use SolrSrerver for fulltext searches; both on metadata both on
> > content binary.
> > In general i have to find all nodes nt:file that contain the word
> > “company” or all nodes that have childs nt:resource that contain the
> > same word.
> >
> > Unfortunately if upload e file (so a node that is a nt:resource) and
> > i use this query SELECT p.* FROM [nt:file] as p where
> > contains(p.*,''company ')
> >
> > Solr find result but the RowIterator doesn’t return anything.
> >
> > Instead the above query works
> > SELECT p.* FROM [nt:resource] as p where contains(p.*,'company') But
> > doesn’t find nt:file nodes
> >
> > Can you help me ?
> >
> > Thanks in advance.
> >
> >
> > [cid:image002.png@01D2A3E8.D7747740]
> > Francesco Ancona | Software Dev. Dept. (SP) - Software Architect tel.
> > +39 049 8979797 <049%20897%209797> <049%20897%209797>
> <049%20897%209797> | fax +39 049
> 8978800 <049%20897%208800>
> > <049%20897%208800> | cel. +39 3299060325 <329%20906%200325>
> <329%20906%200325>
> <329%20906%200325>
> > e-mail: francesco.ancona@siav.it<ma...@siav.it> | www.siav.it<<http://www.siav.it%3c>
> > https://na01.safelinks.protection.outlook.com/?url=www.siav.it&data=
> > 02
> > %7C01%7C%7Caed3cadf483741e2971708d471f7b284%7Cfa7b1b5a7b34438794aed2
> > c1
> > 78decee1%7C0%7C0%7C636258756051666135&sdata=GFXjC%2BgyoIh37AXmGYhYdO
> > Rt
> > Xp1dFiA5v0hoghgbtBw%3D&reserved=0
> > >
> >
> > I contenuti di questa e-mail e dei suoi allegati sono confidenziali
> > e riservati esclusivamente ai destinatari.
> > L'utilizzo per qualunque fine del presente messaggio e degli
> > allegati così come la relativa divulgazione senza l'autorizzazione
> > del mittente sono vietati.
> > Se avete ricevuto questa e-mail per errore, vi preghiamo di
> > distruggerla e di comunicarcelo.
> > I dati personali sono trattati esclusivamente per le finalità della
> > presente comunicazione in conformità con la legislazione vigente (D.lgs.
> > 196/2003 "Codice Privacy").
> > Per informazioni: SIAV S.p.A. – siav@siav.it<ma...@siav.it> – 049 8979797
> <049%20897%209797>
> <049%20897%209797>
> > <049%20897%209797>
> >
> > The contents of this e-mail and its attachments are confidential and
> > reserved exclusively to the recipients.
> > The use for any purpose of this message and attachments as well as
> > its disclosure without the consent of the sender is prohibited.
> > If you have received this email in error, please destroy it and
> > notify
> us.
> > Personal data shall be processed solely for the purposes of this
> > notice in accordance with current legislation (Legislative Decree no.
> > 196/2003 "Code").
> > For more information: SIAV S.p.A. – siav@siav.it<ma...@siav.it> – 049 8979797
> <049%20897%209797>
> <049%20897%209797>
> > <049%20897%209797>
> >
> >
>
>
>
>
> **********************************************************************
> ************** This footnote confirms that this email message has been
> scanned by PineApp Mail-SeCure for the presence of malicious code,
> vandals & computer viruses.
>
> **********************************************************************
> **************
>
>
>
>
> **********************************************************************
> ************** This footnote confirms that this email message has been
> scanned by PineApp Mail-SeCure for the presence of malicious code,
> vandals & computer viruses.
>
> **********************************************************************
> **************
>
>
>
>
************************************************************************************
This footnote confirms that this email message has been scanned by PineApp Mail-SeCure for the presence of malicious code, vandals & computer viruses.
************************************************************************************
Re: problem on oak jcr sql2 query
Posted by Davide Giannella <da...@apache.org>.
On 28/03/2017 12:34, Tommaso Teofili wrote:
> It might also be useful to enable debug logging
> for org.apache.jackrabbit.oak.query,
+1 and provide the output somewhere on the web for easy reading. For
example gist.github.com works perfectly for this.
Davide
Re: problem on oak jcr sql2 query
Posted by Tommaso Teofili <to...@gmail.com>.
Hi Francesco,
do you have other indexes within your Oak repo ?
It might be that the query engine selects a different index which only acts
on [nt:file] nodes.
You can try checking the plan [1] for your query and compare with the
[nt:base] version.
It might also be useful to enable debug logging
for org.apache.jackrabbit.oak.query, that will allow you to check the costs
associated to each index so that it should be easier to eventually tweak
the index definitions accordingly (note that the query engine selects the
index with the lowest cost), e.g. you should see something like:
...
cost for solr is 1.4
cost for lucene is 1.2
cost for reference is Infinity
...
Regards,
Tommaso
[1] :
http://jackrabbit.apache.org/oak/docs/query/query-troubleshooting.html#Query_Plan
Il giorno mar 28 mar 2017 alle ore 12:28 Ancona Francesco <
Francesco.Ancona@siav.it> ha scritto:
> We have wrapped oak jcr implementation with our data model, so it's not so
> easy give you our unit test (our sw is not yet open sourece :-))
> Besides we know the documenti is correctly indexed, cause we see it in
> solr; so you can use any type of pdf: oak manage full text correctly.
>
> Anyway we tried to use a query like this to optimize performance:
> SELECT parent.* FROM [nt:file] AS parent INNER JOIN [nt:resource] AS child
> ON ISCHILDNODE(child,parent) WHERE CONTAINS(child.*, ' company') or
> CONTAINS(parent.*, ' company')
>
> But we saw that index planner doesn't permit solr query (oak doesn't use
> solr for the query). So we can't find words inside content (nt:resource)
>
> What is wrong ?
> Why oak doesn't use solr for full text query ?
>
> Thanks in advance,
> best regards
>
> -----Messaggio originale-----
> Da: Tommaso Teofili [mailto:tommaso@apache.org]
> Inviato: martedì 28 marzo 2017 10:33
> A: oak-dev@jackrabbit.apache.org
> Cc: Diquigiovanni Simone <Si...@siav.it>
> Oggetto: Re: problem on oak jcr sql2 query
>
> Hi Francesco,
>
> Il giorno lun 27 mar 2017 alle ore 08:59 Ancona Francesco <
> Francesco.Ancona@siav.it> ha scritto:
>
> Sorry.
>
> We are using Oak 1.4.10 and solr 4.10.4
>
> i send you also a pdf example: the searched word is "sezione"
>
>
> attachments do not usually get through the mailing list therefore we can't
> look into it.
>
>
>
> In another document ([nt:file] that doesn't have childs) i'd want match
> only through metadata that contains the word "company"
>
> Actually i resolved the problem executing a query like this: select p.*
> from [nt:base] as p where ...... contains (p.*, "company") or contains
> (p.*, "sezione")
>
> Then i explore (programmatically and after the query response) jcr nodes
> to set only nodes that are [nt:file]
>
> Is it the correct approach ?
>
>
> this can work but it's surely worse in terms of performance as you
> retrieve and skip some docs you don't really need.
> If you can provide the PDF via a link or, better, a unit test we can
> probably help you more effectively.
>
> Regards,
> Tommaso
>
>
>
> Thanks in advance,
> best regards
>
> -----Messaggio originale-----
> Da: Tommaso Teofili [mailto:tommaso.teofili@gmail.com]
> Inviato: venerdì 24 marzo 2017 14:56
> A: oak-dev@jackrabbit.apache.org
> Cc: Diquigiovanni Simone <Si...@siav.it>
> Oggetto: Re: problem on oak jcr sql2 query
>
> It'd be helpful to also know the version of Oak and Solr you're using and,
> possibly, sample content you expect the query to match.
>
> Thanks,
> Tommaso
>
>
> Il giorno ven 24 mar 2017 alle ore 14:54 Thomas Mueller <mu...@adobe.com>
> ha scritto:
>
> > Could you post the index definition please?
> >
> >
> > From: Ancona Francesco <Fr...@siav.it>
> > Reply-To: "oak-dev@jackrabbit.apache.org"
> > <oa...@jackrabbit.apache.org>
> > Date: Thursday, 23 March 2017 at 15:19
> > To: "oak-dev@jackrabbit.apache.org" <oa...@jackrabbit.apache.org>
> > Cc: Diquigiovanni Simone <Si...@siav.it>
> > Subject: problem on oak jcr sql2 query
> >
> > Hi all,
> > we use SolrSrerver for fulltext searches; both on metadata both on
> > content binary.
> > In general i have to find all nodes nt:file that contain the word
> > “company” or all nodes that have childs nt:resource that contain the
> > same word.
> >
> > Unfortunately if upload e file (so a node that is a nt:resource) and i
> > use this query SELECT p.* FROM [nt:file] as p where
> > contains(p.*,''company ')
> >
> > Solr find result but the RowIterator doesn’t return anything.
> >
> > Instead the above query works
> > SELECT p.* FROM [nt:resource] as p where contains(p.*,'company') But
> > doesn’t find nt:file nodes
> >
> > Can you help me ?
> >
> > Thanks in advance.
> >
> >
> > [cid:image002.png@01D2A3E8.D7747740]
> > Francesco Ancona | Software Dev. Dept. (SP) - Software Architect tel.
> > +39 049 8979797 <049%20897%209797> <049%20897%209797>
> <049%20897%209797> | fax +39 049
> 8978800 <049%20897%208800>
> > <049%20897%208800> | cel. +39 3299060325 <329%20906%200325>
> <329%20906%200325>
> <329%20906%200325>
> > e-mail: francesco.ancona@siav.it | www.siav.it<
> > https://na01.safelinks.protection.outlook.com/?url=www.siav.it&data=02
> > %7C01%7C%7Caed3cadf483741e2971708d471f7b284%7Cfa7b1b5a7b34438794aed2c1
> > 78decee1%7C0%7C0%7C636258756051666135&sdata=GFXjC%2BgyoIh37AXmGYhYdORt
> > Xp1dFiA5v0hoghgbtBw%3D&reserved=0
> > >
> >
> > I contenuti di questa e-mail e dei suoi allegati sono confidenziali e
> > riservati esclusivamente ai destinatari.
> > L'utilizzo per qualunque fine del presente messaggio e degli allegati
> > così come la relativa divulgazione senza l'autorizzazione del mittente
> > sono vietati.
> > Se avete ricevuto questa e-mail per errore, vi preghiamo di
> > distruggerla e di comunicarcelo.
> > I dati personali sono trattati esclusivamente per le finalità della
> > presente comunicazione in conformità con la legislazione vigente (D.lgs.
> > 196/2003 "Codice Privacy").
> > Per informazioni: SIAV S.p.A. – siav@siav.it – 049 8979797
> <049%20897%209797>
> <049%20897%209797>
> > <049%20897%209797>
> >
> > The contents of this e-mail and its attachments are confidential and
> > reserved exclusively to the recipients.
> > The use for any purpose of this message and attachments as well as its
> > disclosure without the consent of the sender is prohibited.
> > If you have received this email in error, please destroy it and notify
> us.
> > Personal data shall be processed solely for the purposes of this
> > notice in accordance with current legislation (Legislative Decree no.
> > 196/2003 "Code").
> > For more information: SIAV S.p.A. – siav@siav.it – 049 8979797
> <049%20897%209797>
> <049%20897%209797>
> > <049%20897%209797>
> >
> >
>
>
>
>
> ************************************************************************************
> This footnote confirms that this email message has been scanned by PineApp
> Mail-SeCure for the presence of malicious code, vandals & computer viruses.
>
> ************************************************************************************
>
>
>
>
> ************************************************************************************
> This footnote confirms that this email message has been scanned by PineApp
> Mail-SeCure for the presence of malicious code, vandals & computer viruses.
>
> ************************************************************************************
>
>
>
>
R: problem on oak jcr sql2 query
Posted by Ancona Francesco <Fr...@siav.it>.
We have wrapped oak jcr implementation with our data model, so it's not so easy give you our unit test (our sw is not yet open sourece :-))
Besides we know the documenti is correctly indexed, cause we see it in solr; so you can use any type of pdf: oak manage full text correctly.
Anyway we tried to use a query like this to optimize performance:
SELECT parent.* FROM [nt:file] AS parent INNER JOIN [nt:resource] AS child ON ISCHILDNODE(child,parent) WHERE CONTAINS(child.*, ' company') or CONTAINS(parent.*, ' company')
But we saw that index planner doesn't permit solr query (oak doesn't use solr for the query). So we can't find words inside content (nt:resource)
What is wrong ?
Why oak doesn't use solr for full text query ?
Thanks in advance,
best regards
-----Messaggio originale-----
Da: Tommaso Teofili [mailto:tommaso@apache.org]
Inviato: martedì 28 marzo 2017 10:33
A: oak-dev@jackrabbit.apache.org
Cc: Diquigiovanni Simone <Si...@siav.it>
Oggetto: Re: problem on oak jcr sql2 query
Hi Francesco,
Il giorno lun 27 mar 2017 alle ore 08:59 Ancona Francesco < Francesco.Ancona@siav.it> ha scritto:
Sorry.
We are using Oak 1.4.10 and solr 4.10.4
i send you also a pdf example: the searched word is "sezione"
attachments do not usually get through the mailing list therefore we can't look into it.
In another document ([nt:file] that doesn't have childs) i'd want match only through metadata that contains the word "company"
Actually i resolved the problem executing a query like this: select p.* from [nt:base] as p where ...... contains (p.*, "company") or contains (p.*, "sezione")
Then i explore (programmatically and after the query response) jcr nodes to set only nodes that are [nt:file]
Is it the correct approach ?
this can work but it's surely worse in terms of performance as you retrieve and skip some docs you don't really need.
If you can provide the PDF via a link or, better, a unit test we can probably help you more effectively.
Regards,
Tommaso
Thanks in advance,
best regards
-----Messaggio originale-----
Da: Tommaso Teofili [mailto:tommaso.teofili@gmail.com]
Inviato: venerdì 24 marzo 2017 14:56
A: oak-dev@jackrabbit.apache.org
Cc: Diquigiovanni Simone <Si...@siav.it>
Oggetto: Re: problem on oak jcr sql2 query
It'd be helpful to also know the version of Oak and Solr you're using and, possibly, sample content you expect the query to match.
Thanks,
Tommaso
Il giorno ven 24 mar 2017 alle ore 14:54 Thomas Mueller <mu...@adobe.com> ha scritto:
> Could you post the index definition please?
>
>
> From: Ancona Francesco <Fr...@siav.it>
> Reply-To: "oak-dev@jackrabbit.apache.org"
> <oa...@jackrabbit.apache.org>
> Date: Thursday, 23 March 2017 at 15:19
> To: "oak-dev@jackrabbit.apache.org" <oa...@jackrabbit.apache.org>
> Cc: Diquigiovanni Simone <Si...@siav.it>
> Subject: problem on oak jcr sql2 query
>
> Hi all,
> we use SolrSrerver for fulltext searches; both on metadata both on
> content binary.
> In general i have to find all nodes nt:file that contain the word
> “company” or all nodes that have childs nt:resource that contain the
> same word.
>
> Unfortunately if upload e file (so a node that is a nt:resource) and i
> use this query SELECT p.* FROM [nt:file] as p where
> contains(p.*,''company ')
>
> Solr find result but the RowIterator doesn’t return anything.
>
> Instead the above query works
> SELECT p.* FROM [nt:resource] as p where contains(p.*,'company') But
> doesn’t find nt:file nodes
>
> Can you help me ?
>
> Thanks in advance.
>
>
> [cid:image002.png@01D2A3E8.D7747740]
> Francesco Ancona | Software Dev. Dept. (SP) - Software Architect tel.
> +39 049 8979797 <049%20897%209797> <049%20897%209797> | fax +39 049
8978800 <049%20897%208800>
> <049%20897%208800> | cel. +39 3299060325 <329%20906%200325>
<329%20906%200325>
> e-mail: francesco.ancona@siav.it | www.siav.it<
> https://na01.safelinks.protection.outlook.com/?url=www.siav.it&data=02
> %7C01%7C%7Caed3cadf483741e2971708d471f7b284%7Cfa7b1b5a7b34438794aed2c1
> 78decee1%7C0%7C0%7C636258756051666135&sdata=GFXjC%2BgyoIh37AXmGYhYdORt
> Xp1dFiA5v0hoghgbtBw%3D&reserved=0
> >
>
> I contenuti di questa e-mail e dei suoi allegati sono confidenziali e
> riservati esclusivamente ai destinatari.
> L'utilizzo per qualunque fine del presente messaggio e degli allegati
> così come la relativa divulgazione senza l'autorizzazione del mittente
> sono vietati.
> Se avete ricevuto questa e-mail per errore, vi preghiamo di
> distruggerla e di comunicarcelo.
> I dati personali sono trattati esclusivamente per le finalità della
> presente comunicazione in conformità con la legislazione vigente (D.lgs.
> 196/2003 "Codice Privacy").
> Per informazioni: SIAV S.p.A. – siav@siav.it – 049 8979797
<049%20897%209797>
> <049%20897%209797>
>
> The contents of this e-mail and its attachments are confidential and
> reserved exclusively to the recipients.
> The use for any purpose of this message and attachments as well as its
> disclosure without the consent of the sender is prohibited.
> If you have received this email in error, please destroy it and notify us.
> Personal data shall be processed solely for the purposes of this
> notice in accordance with current legislation (Legislative Decree no.
> 196/2003 "Code").
> For more information: SIAV S.p.A. – siav@siav.it – 049 8979797
<049%20897%209797>
> <049%20897%209797>
>
>
************************************************************************************
This footnote confirms that this email message has been scanned by PineApp Mail-SeCure for the presence of malicious code, vandals & computer viruses.
************************************************************************************
************************************************************************************
This footnote confirms that this email message has been scanned by PineApp Mail-SeCure for the presence of malicious code, vandals & computer viruses.
************************************************************************************
Re: problem on oak jcr sql2 query
Posted by Tommaso Teofili <to...@apache.org>.
Hi Francesco,
Il giorno lun 27 mar 2017 alle ore 08:59 Ancona Francesco <
Francesco.Ancona@siav.it> ha scritto:
Sorry.
We are using Oak 1.4.10 and solr 4.10.4
i send you also a pdf example: the searched word is "sezione"
attachments do not usually get through the mailing list therefore we can't
look into it.
In another document ([nt:file] that doesn't have childs) i'd want match
only through metadata that contains the word "company"
Actually i resolved the problem executing a query like this: select p.*
from [nt:base] as p where ...... contains (p.*, "company") or contains
(p.*, "sezione")
Then i explore (programmatically and after the query response) jcr nodes to
set only nodes that are [nt:file]
Is it the correct approach ?
this can work but it's surely worse in terms of performance as you retrieve
and skip some docs you don't really need.
If you can provide the PDF via a link or, better, a unit test we can
probably help you more effectively.
Regards,
Tommaso
Thanks in advance,
best regards
-----Messaggio originale-----
Da: Tommaso Teofili [mailto:tommaso.teofili@gmail.com]
Inviato: venerdì 24 marzo 2017 14:56
A: oak-dev@jackrabbit.apache.org
Cc: Diquigiovanni Simone <Si...@siav.it>
Oggetto: Re: problem on oak jcr sql2 query
It'd be helpful to also know the version of Oak and Solr you're using and,
possibly, sample content you expect the query to match.
Thanks,
Tommaso
Il giorno ven 24 mar 2017 alle ore 14:54 Thomas Mueller <mu...@adobe.com>
ha scritto:
> Could you post the index definition please?
>
>
> From: Ancona Francesco <Fr...@siav.it>
> Reply-To: "oak-dev@jackrabbit.apache.org"
> <oa...@jackrabbit.apache.org>
> Date: Thursday, 23 March 2017 at 15:19
> To: "oak-dev@jackrabbit.apache.org" <oa...@jackrabbit.apache.org>
> Cc: Diquigiovanni Simone <Si...@siav.it>
> Subject: problem on oak jcr sql2 query
>
> Hi all,
> we use SolrSrerver for fulltext searches; both on metadata both on
> content binary.
> In general i have to find all nodes nt:file that contain the word
> “company” or all nodes that have childs nt:resource that contain the
> same word.
>
> Unfortunately if upload e file (so a node that is a nt:resource) and i
> use this query SELECT p.* FROM [nt:file] as p where
> contains(p.*,''company ')
>
> Solr find result but the RowIterator doesn’t return anything.
>
> Instead the above query works
> SELECT p.* FROM [nt:resource] as p where contains(p.*,'company') But
> doesn’t find nt:file nodes
>
> Can you help me ?
>
> Thanks in advance.
>
>
> [cid:image002.png@01D2A3E8.D7747740]
> Francesco Ancona | Software Dev. Dept. (SP) - Software Architect tel.
> +39 049 8979797 <049%20897%209797> <049%20897%209797> | fax +39 049
8978800 <049%20897%208800>
> <049%20897%208800> | cel. +39 3299060325 <329%20906%200325>
<329%20906%200325>
> e-mail: francesco.ancona@siav.it | www.siav.it<
> https://na01.safelinks.protection.outlook.com/?url=www.siav.it&data=02
> %7C01%7C%7Caed3cadf483741e2971708d471f7b284%7Cfa7b1b5a7b34438794aed2c1
> 78decee1%7C0%7C0%7C636258756051666135&sdata=GFXjC%2BgyoIh37AXmGYhYdORt
> Xp1dFiA5v0hoghgbtBw%3D&reserved=0
> >
>
> I contenuti di questa e-mail e dei suoi allegati sono confidenziali e
> riservati esclusivamente ai destinatari.
> L'utilizzo per qualunque fine del presente messaggio e degli allegati
> così come la relativa divulgazione senza l'autorizzazione del mittente
> sono vietati.
> Se avete ricevuto questa e-mail per errore, vi preghiamo di
> distruggerla e di comunicarcelo.
> I dati personali sono trattati esclusivamente per le finalità della
> presente comunicazione in conformità con la legislazione vigente (D.lgs.
> 196/2003 "Codice Privacy").
> Per informazioni: SIAV S.p.A. – siav@siav.it – 049 8979797
<049%20897%209797>
> <049%20897%209797>
>
> The contents of this e-mail and its attachments are confidential and
> reserved exclusively to the recipients.
> The use for any purpose of this message and attachments as well as its
> disclosure without the consent of the sender is prohibited.
> If you have received this email in error, please destroy it and notify us.
> Personal data shall be processed solely for the purposes of this
> notice in accordance with current legislation (Legislative Decree no.
> 196/2003 "Code").
> For more information: SIAV S.p.A. – siav@siav.it – 049 8979797
<049%20897%209797>
> <049%20897%209797>
>
>
************************************************************************************
This footnote confirms that this email message has been scanned by PineApp
Mail-SeCure for the presence of malicious code, vandals & computer viruses.
************************************************************************************
R: problem on oak jcr sql2 query
Posted by Ancona Francesco <Fr...@siav.it>.
Sorry.
We are using Oak 1.4.10 and solr 4.10.4
i send you also a pdf example: the searched word is "sezione"
In another document ([nt:file] that doesn't have childs) i'd want match only through metadata that contains the word "company"
Actually i resolved the problem executing a query like this: select p.* from [nt:base] as p where ...... contains (p.*, "company") or contains (p.*, "sezione")
Then i explore (programmatically and after the query response) jcr nodes to set only nodes that are [nt:file]
Is it the correct approach ?
Thanks in advance,
best regards
-----Messaggio originale-----
Da: Tommaso Teofili [mailto:tommaso.teofili@gmail.com]
Inviato: venerdì 24 marzo 2017 14:56
A: oak-dev@jackrabbit.apache.org
Cc: Diquigiovanni Simone <Si...@siav.it>
Oggetto: Re: problem on oak jcr sql2 query
It'd be helpful to also know the version of Oak and Solr you're using and, possibly, sample content you expect the query to match.
Thanks,
Tommaso
Il giorno ven 24 mar 2017 alle ore 14:54 Thomas Mueller <mu...@adobe.com> ha scritto:
> Could you post the index definition please?
>
>
> From: Ancona Francesco <Fr...@siav.it>
> Reply-To: "oak-dev@jackrabbit.apache.org"
> <oa...@jackrabbit.apache.org>
> Date: Thursday, 23 March 2017 at 15:19
> To: "oak-dev@jackrabbit.apache.org" <oa...@jackrabbit.apache.org>
> Cc: Diquigiovanni Simone <Si...@siav.it>
> Subject: problem on oak jcr sql2 query
>
> Hi all,
> we use SolrSrerver for fulltext searches; both on metadata both on
> content binary.
> In general i have to find all nodes nt:file that contain the word
> “company” or all nodes that have childs nt:resource that contain the
> same word.
>
> Unfortunately if upload e file (so a node that is a nt:resource) and i
> use this query SELECT p.* FROM [nt:file] as p where
> contains(p.*,''company ')
>
> Solr find result but the RowIterator doesn’t return anything.
>
> Instead the above query works
> SELECT p.* FROM [nt:resource] as p where contains(p.*,'company') But
> doesn’t find nt:file nodes
>
> Can you help me ?
>
> Thanks in advance.
>
>
> [cid:image002.png@01D2A3E8.D7747740]
> Francesco Ancona | Software Dev. Dept. (SP) - Software Architect tel.
> +39 049 8979797 <049%20897%209797> | fax +39 049 8978800
> <049%20897%208800> | cel. +39 3299060325 <329%20906%200325>
> e-mail: francesco.ancona@siav.it | www.siav.it<
> https://na01.safelinks.protection.outlook.com/?url=www.siav.it&data=02
> %7C01%7C%7Caed3cadf483741e2971708d471f7b284%7Cfa7b1b5a7b34438794aed2c1
> 78decee1%7C0%7C0%7C636258756051666135&sdata=GFXjC%2BgyoIh37AXmGYhYdORt
> Xp1dFiA5v0hoghgbtBw%3D&reserved=0
> >
>
> I contenuti di questa e-mail e dei suoi allegati sono confidenziali e
> riservati esclusivamente ai destinatari.
> L'utilizzo per qualunque fine del presente messaggio e degli allegati
> così come la relativa divulgazione senza l'autorizzazione del mittente
> sono vietati.
> Se avete ricevuto questa e-mail per errore, vi preghiamo di
> distruggerla e di comunicarcelo.
> I dati personali sono trattati esclusivamente per le finalità della
> presente comunicazione in conformità con la legislazione vigente (D.lgs.
> 196/2003 "Codice Privacy").
> Per informazioni: SIAV S.p.A. – siav@siav.it – 049 8979797
> <049%20897%209797>
>
> The contents of this e-mail and its attachments are confidential and
> reserved exclusively to the recipients.
> The use for any purpose of this message and attachments as well as its
> disclosure without the consent of the sender is prohibited.
> If you have received this email in error, please destroy it and notify us.
> Personal data shall be processed solely for the purposes of this
> notice in accordance with current legislation (Legislative Decree no.
> 196/2003 "Code").
> For more information: SIAV S.p.A. – siav@siav.it – 049 8979797
> <049%20897%209797>
>
>
************************************************************************************
This footnote confirms that this email message has been scanned by PineApp Mail-SeCure for the presence of malicious code, vandals & computer viruses.
************************************************************************************