[Product-Developers] Products.TextIndexNG3 and duplicate content in SearchableText-index for ATBlob
ajung
lists at zopyx.com
Fri Aug 30 09:25:31 UTC 2013
No idea, take the debugger and check your adapter is doing to extract the
content
from your file.
-aj
Jochen Dekeyser wrote
> If I add a file in Plone /plone1:
> * filename: my-file.txt
> * content: this is content
>
> Afterwards go to the ZMI -> plone1 -> portal_catalog -> tab Catalog ->
> /plone1/my-file.txt -> SearchableText shows:
> [u'my-filetxt', u'my-filetxt',* u'this', u'is', u'content', u'this',
> u'is',
> u'content*']
> (the double u'my-filetxt' is from the ID and Title field and are normal)
>
> Jochen
>
>
> On Fri, Aug 30, 2013 at 10:35 AM, ajung <
> lists@
> > wrote:
>
>> What do yo mean with "the content of that text-file is added twice"?
>>
>> -aj
>>
>>
>> Jochen Dekeyser wrote
>> > Hi,
>> >
>> > I am trying to integrate Products.TextIndexNG3 in my Plone site. It
>> works
>> > very well. And I am customizing some stuff in an add-on for my sites.
>> >
>> > But I noticed a strange thing which I can not explain. If you add e.g.
>> a
>> > text-file (ATBlob) to the plone site, the content of that text-file is
>> > added twice to the SearchableText-index... Although that works, I don't
>> > find a good explanation... (Tested on Plone 4.2.5 Unified Installer +
>> > Products.TextIndexNG3 3.4.7.1). So my question is: is there a reason
>> why
>> > this is done?
>> >
>> > I can reconfigure this behaviour in my add-on (so that is NOT the
>> > question):
>> > configure.zcml:
>> >
>> >
> <include package="z3c.unconfigure" file="meta.zcml"/>
>> >
>> >
> <unconfigure>
>> >
>> >
> <adapter
>>
> > factory="Products.TextIndexNG3.adapters.plone_adapters.ATFileAdapter"/>
>> >
>> >
> </unconfigure>
>> >
>> >
> <adapter factory=".plone_adapters.ATFileAdapter"/>
>> > plone_adapters.py:
>> > from Products.ATContentTypes.interface.file import IATFile
>> > from Products.TextIndexNG3.adapters.cmf_adapters import
>> > CMFContentAdapter
>> > from zope.component import adapts
>> > from zope.interface import implements
>> > from zopyx.txng3.core.interfaces import IIndexableContent
>> > class ATFileAdapter(CMFContentAdapter):
>> > adapts(IATFile)
>> > implements(IIndexableContent)
>> >
>> > Jochen
>>
>>
>>
>>
>>
>> --
>> View this message in context:
>> http://plone.293351.n2.nabble.com/Products-TextIndexNG3-and-duplicate-content-in-SearchableText-index-for-ATBlob-tp7567516p7567517.html
>> Sent from the Product Developers mailing list archive at Nabble.com.
>> _______________________________________________
>> Product-Developers mailing list
>>
> Product-Developers at .plone
>> https://lists.plone.org/mailman/listinfo/plone-product-developers
>>
>
> _______________________________________________
> Product-Developers mailing list
> Product-Developers at .plone
> https://lists.plone.org/mailman/listinfo/plone-product-developers
--
View this message in context: http://plone.293351.n2.nabble.com/Products-TextIndexNG3-and-duplicate-content-in-SearchableText-index-for-ATBlob-tp7567516p7567519.html
Sent from the Product Developers mailing list archive at Nabble.com.
More information about the Product-Developers
mailing list