You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by techie2k <de...@gmail.com> on 2015/10/11 08:57:55 UTC

Document search fails

Hi,

I'm using Jackrabbit 2.6.0 and java 1.6

Trying to search text from word/pdf/text files, but eventually search fails
with jcr:data.
Only searches in document meta data and not on contents

SQL-2 query

select * from [nt:resource] AS resource where contains(resource.[jcr:data],
'*1*')

Any help on this?

Attachment repository config and cnd file:
repository.xml
<http://jackrabbit.510166.n4.nabble.com/file/n4663116/repository.xml>  
et_nodetypes.cnd
<http://jackrabbit.510166.n4.nabble.com/file/n4663116/et_nodetypes.cnd>  







--
View this message in context: http://jackrabbit.510166.n4.nabble.com/Document-search-fails-tp4663116.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.

Re: Document search fails

Posted by Ben Frisoni <fr...@gmail.com>.
Sorry. Made a correction. Lol

On Wed, Oct 14, 2015, 10:26 PM Clay Ferguson <wc...@gmail.com> wrote:

> Uh Ben....are you sure the asterisks are all correct on that? lol.
> Seriously, can you check that. I would swear that won't work, but I've been
> wrong before, and since that one time have always remained humble ever
> since!
>
> Best regards,
> Clay Ferguson
> wclayf@gmail.com
>
>
> On Wed, Oct 14, 2015 at 9:20 PM, Ben Frisoni <fr...@gmail.com> wrote:
>
> > @techie2k
> >
> > Not sure if you have any specific index configurations set. But give
> this a
> > try:
> > select * from [nt:resource] AS resource where
> > contains*(resource.*,**'*1*')*
> >
> > jackrabbit adds binary properties content to the index of the node
> itself.
> >
> > Hope that helps.
> >
> > Cheers
> >
> > On Sun, Oct 11, 2015 at 10:05 AM, Clay Ferguson <wc...@gmail.com>
> wrote:
> >
> > > Here's an example SQL search code form meta64. Note it uses "like"
> > instead
> > > of "contains" because of Lucene having an issue with 'contains' not
> > > working.
> > >
> > >
> > >
> >
> https://github.com/Clay-Ferguson/meta64/blob/master/src/main/java/com/meta64/mobile/service/NodeSearchService.java
> > >
> > > That search code, as you can see, searches nt:base and under specific
> > root
> > > node only.
> > >
> > > But your problem may be that binaries aren't being searched in
> properly,
> > so
> > > be sure Tika is properly enabled. (not sure how, probably is enabled by
> > > default). Use "Tika Configuration" as a search term.
> > >
> > >
> > > Best regards,
> > > Clay Ferguson
> > > wclayf@gmail.com
> > >
> > >
> > > On Sun, Oct 11, 2015 at 1:57 AM, techie2k <de...@gmail.com>
> > > wrote:
> > >
> > > > Hi,
> > > >
> > > > I'm using Jackrabbit 2.6.0 and java 1.6
> > > >
> > > > Trying to search text from word/pdf/text files, but eventually search
> > > fails
> > > > with jcr:data.
> > > > Only searches in document meta data and not on contents
> > > >
> > > > SQL-2 query
> > > >
> > > > select * from [nt:resource] AS resource where
> > > contains(resource.[jcr:data],
> > > > '*1*')
> > > >
> > > > Any help on this?
> > > >
> > > > Attachment repository config and cnd file:
> > > > repository.xml
> > > > <http://jackrabbit.510166.n4.nabble.com/file/n4663116/repository.xml
> >
> > > > et_nodetypes.cnd
> > > > <
> http://jackrabbit.510166.n4.nabble.com/file/n4663116/et_nodetypes.cnd
> > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > --
> > > > View this message in context:
> > > >
> > >
> >
> http://jackrabbit.510166.n4.nabble.com/Document-search-fails-tp4663116.html
> > > > Sent from the Jackrabbit - Users mailing list archive at Nabble.com.
> > > >
> > >
> >
>

Re: Document search fails

Posted by Clay Ferguson <wc...@gmail.com>.
Uh Ben....are you sure the asterisks are all correct on that? lol.
Seriously, can you check that. I would swear that won't work, but I've been
wrong before, and since that one time have always remained humble ever
since!

Best regards,
Clay Ferguson
wclayf@gmail.com


On Wed, Oct 14, 2015 at 9:20 PM, Ben Frisoni <fr...@gmail.com> wrote:

> @techie2k
>
> Not sure if you have any specific index configurations set. But give this a
> try:
> select * from [nt:resource] AS resource where
> contains*(resource.*,**'*1*')*
>
> jackrabbit adds binary properties content to the index of the node itself.
>
> Hope that helps.
>
> Cheers
>
> On Sun, Oct 11, 2015 at 10:05 AM, Clay Ferguson <wc...@gmail.com> wrote:
>
> > Here's an example SQL search code form meta64. Note it uses "like"
> instead
> > of "contains" because of Lucene having an issue with 'contains' not
> > working.
> >
> >
> >
> https://github.com/Clay-Ferguson/meta64/blob/master/src/main/java/com/meta64/mobile/service/NodeSearchService.java
> >
> > That search code, as you can see, searches nt:base and under specific
> root
> > node only.
> >
> > But your problem may be that binaries aren't being searched in properly,
> so
> > be sure Tika is properly enabled. (not sure how, probably is enabled by
> > default). Use "Tika Configuration" as a search term.
> >
> >
> > Best regards,
> > Clay Ferguson
> > wclayf@gmail.com
> >
> >
> > On Sun, Oct 11, 2015 at 1:57 AM, techie2k <de...@gmail.com>
> > wrote:
> >
> > > Hi,
> > >
> > > I'm using Jackrabbit 2.6.0 and java 1.6
> > >
> > > Trying to search text from word/pdf/text files, but eventually search
> > fails
> > > with jcr:data.
> > > Only searches in document meta data and not on contents
> > >
> > > SQL-2 query
> > >
> > > select * from [nt:resource] AS resource where
> > contains(resource.[jcr:data],
> > > '*1*')
> > >
> > > Any help on this?
> > >
> > > Attachment repository config and cnd file:
> > > repository.xml
> > > <http://jackrabbit.510166.n4.nabble.com/file/n4663116/repository.xml>
> > > et_nodetypes.cnd
> > > <http://jackrabbit.510166.n4.nabble.com/file/n4663116/et_nodetypes.cnd
> >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > > --
> > > View this message in context:
> > >
> >
> http://jackrabbit.510166.n4.nabble.com/Document-search-fails-tp4663116.html
> > > Sent from the Jackrabbit - Users mailing list archive at Nabble.com.
> > >
> >
>

Re: Document search fails

Posted by Ben Frisoni <fr...@gmail.com>.
@techie2k

Not sure if you have any specific index configurations set. But give this a
try:
select * from [nt:resource] AS resource where contains*(resource.*,**'*1*')*

jackrabbit adds binary properties content to the index of the node itself.

Hope that helps.

Cheers

On Sun, Oct 11, 2015 at 10:05 AM, Clay Ferguson <wc...@gmail.com> wrote:

> Here's an example SQL search code form meta64. Note it uses "like" instead
> of "contains" because of Lucene having an issue with 'contains' not
> working.
>
>
> https://github.com/Clay-Ferguson/meta64/blob/master/src/main/java/com/meta64/mobile/service/NodeSearchService.java
>
> That search code, as you can see, searches nt:base and under specific root
> node only.
>
> But your problem may be that binaries aren't being searched in properly, so
> be sure Tika is properly enabled. (not sure how, probably is enabled by
> default). Use "Tika Configuration" as a search term.
>
>
> Best regards,
> Clay Ferguson
> wclayf@gmail.com
>
>
> On Sun, Oct 11, 2015 at 1:57 AM, techie2k <de...@gmail.com>
> wrote:
>
> > Hi,
> >
> > I'm using Jackrabbit 2.6.0 and java 1.6
> >
> > Trying to search text from word/pdf/text files, but eventually search
> fails
> > with jcr:data.
> > Only searches in document meta data and not on contents
> >
> > SQL-2 query
> >
> > select * from [nt:resource] AS resource where
> contains(resource.[jcr:data],
> > '*1*')
> >
> > Any help on this?
> >
> > Attachment repository config and cnd file:
> > repository.xml
> > <http://jackrabbit.510166.n4.nabble.com/file/n4663116/repository.xml>
> > et_nodetypes.cnd
> > <http://jackrabbit.510166.n4.nabble.com/file/n4663116/et_nodetypes.cnd>
> >
> >
> >
> >
> >
> >
> >
> > --
> > View this message in context:
> >
> http://jackrabbit.510166.n4.nabble.com/Document-search-fails-tp4663116.html
> > Sent from the Jackrabbit - Users mailing list archive at Nabble.com.
> >
>

Re: Document search fails

Posted by Clay Ferguson <wc...@gmail.com>.
Here's an example SQL search code form meta64. Note it uses "like" instead
of "contains" because of Lucene having an issue with 'contains' not working.

https://github.com/Clay-Ferguson/meta64/blob/master/src/main/java/com/meta64/mobile/service/NodeSearchService.java

That search code, as you can see, searches nt:base and under specific root
node only.

But your problem may be that binaries aren't being searched in properly, so
be sure Tika is properly enabled. (not sure how, probably is enabled by
default). Use "Tika Configuration" as a search term.


Best regards,
Clay Ferguson
wclayf@gmail.com


On Sun, Oct 11, 2015 at 1:57 AM, techie2k <de...@gmail.com>
wrote:

> Hi,
>
> I'm using Jackrabbit 2.6.0 and java 1.6
>
> Trying to search text from word/pdf/text files, but eventually search fails
> with jcr:data.
> Only searches in document meta data and not on contents
>
> SQL-2 query
>
> select * from [nt:resource] AS resource where contains(resource.[jcr:data],
> '*1*')
>
> Any help on this?
>
> Attachment repository config and cnd file:
> repository.xml
> <http://jackrabbit.510166.n4.nabble.com/file/n4663116/repository.xml>
> et_nodetypes.cnd
> <http://jackrabbit.510166.n4.nabble.com/file/n4663116/et_nodetypes.cnd>
>
>
>
>
>
>
>
> --
> View this message in context:
> http://jackrabbit.510166.n4.nabble.com/Document-search-fails-tp4663116.html
> Sent from the Jackrabbit - Users mailing list archive at Nabble.com.
>