Tribune

Home » Liferay Portal » English » 3. Development

Vista Combinata Vista Piatta Vista ad Albero
Discussioni [ Precedente | Successivo ]
toggle
Mikko Torri
Document Library metadata fields indexed but not searchable
5 marzo 2013 6.08
Risposta

Mikko Torri

Punteggio: Junior Member

Messaggi: 33

Data di Iscrizione: 9 maggio 2011

Messaggi recenti

Hi all

We've extended the metadata of objects in Document Library with custom fields. The custom fields are marked as Indexable and are found in the index (checked with Luke).
However you won't find anything with the search if you search for terms in the custom fields, actually in any DL metadatafields.

Is this a bug, or is it how it's supposed to work (if it is how it's supposed to work, what's the point)?
Are there some configuration options that we haven't found which would have search to include the metadata fields in its query?

Thanks
Mikko
Bart Simpson
RE: Document Library metadata fields indexed but not searchable
7 marzo 2013 1.43
Risposta

Bart Simpson

Punteggio: Liferay Master

Messaggi: 524

Data di Iscrizione: 29 agosto 2011

Messaggi recenti

Did you try and modify the json configuration for facet? What is the field name that luke indicates.
Mikko Torri
RE: Document Library metadata fields indexed but not searchable
7 marzo 2013 6.35
Risposta

Mikko Torri

Punteggio: Junior Member

Messaggi: 33

Data di Iscrizione: 9 maggio 2011

Messaggi recenti

Bart Simpson:
Did you try and modify the json configuration for facet? What is the field name that luke indicates.


No, I haven't tried configuring facets, since it should be included in the default search.

Luke indicates the field name as ddm/10298/text4476, which I can of course use as ddm/10298/text4476:flower to search that field for any flowers. But the default search does not include the field in the query:

query: flower produces this, and finds nothing

+(+(companyId:10154) +((+(entryClassName:com.liferay.portlet.bookmarks.model.BookmarksEntry)) (+(entryClassName:com.liferay.portlet.blogs.model.BlogsEntry)) (+(entryClassName:com.liferay.portlet.calendar.model.CalEvent)) (+(entryClassName:com.liferay.portlet.documentlibrary.model.DLFileEntry) +(status:0)) (+(entryClassName:com.liferay.portlet.journal.model.JournalArticle) +(status:0)) (+(entryClassName:com.liferay.portlet.messageboards.model.MBMessage) +(discussion:false)) (+(entryClassName:com.liferay.portlet.wiki.model.WikiPage)) (+(entryClassName:com.liferay.portal.model.User) +(status:0)))) +(assetCategoryTitles:*flower* assetCategoryTitles_en_GB:*flower* assetTagNames:*flower* comments:flower content:flower description:flower properties:flower title:flower url:flower userName:*flower* extension:flower fileEntryTypeId:flower path:flower classPK:flower content_en_GB:flower description_en_GB:flower entryClassPK:flower title_en_GB:flower type:flower city:flower country:flower emailAddress:flower firstName:flower fullName:flower lastName:flower middleName:flower region:flower screenName:flower street:flower zip:flower)

As you can see none of the metadatafields in dl are included in that search! (starting with ddm/.../fieldname

as it does if I add it in the query myself, when it searches for only that term:

query ddm/10298/text4476:flower produces this, and if finds the documents in question.

+(+(companyId:10154) +((+(entryClassName:com.liferay.portlet.bookmarks.model.BookmarksEntry)) (+(entryClassName:com.liferay.portlet.blogs.model.BlogsEntry)) (+(entryClassName:com.liferay.portlet.calendar.model.CalEvent)) (+(entryClassName:com.liferay.portlet.documentlibrary.model.DLFileEntry) +(status:0)) (+(entryClassName:com.liferay.portlet.journal.model.JournalArticle) +(status:0)) (+(entryClassName:com.liferay.portlet.messageboards.model.MBMessage) +(discussion:false)) (+(entryClassName:com.liferay.portlet.wiki.model.WikiPage)) (+(entryClassName:com.liferay.portal.model.User) +(status:0)))) +(ddm/10298/text4476:*flower* ddm/10298/text4476:flower)

P.S. I tried this with 6.2 m4 and well what can I say... the metadatafields do not work at all in that build!
Denis Signoretto
RE: Document Library metadata fields indexed but not searchable
6 aprile 2013 1.31
Risposta

Denis Signoretto

Punteggio: Expert

Messaggi: 311

Data di Iscrizione: 21 aprile 2009

Messaggi recenti

I have the same issue, and I'm working on 6.1.1 GA2. Did you find any solution?

Thanks,
Denis.
Mikko Torri
RE: Document Library metadata fields indexed but not searchable
8 aprile 2013 1.18
Risposta

Mikko Torri

Punteggio: Junior Member

Messaggi: 33

Data di Iscrizione: 9 maggio 2011

Messaggi recenti

Not yet.

I suspect it's in the indexer. It may not get the correct metadata fields and thus leaves them out from the query. Should be easy to patch using a hook, but haven't had time to look any deeper at the moment.

Mikko
Denis Signoretto
RE: Document Library metadata fields indexed but not searchable
12 aprile 2013 6.51
Risposta

Denis Signoretto

Punteggio: Expert

Messaggi: 311

Data di Iscrizione: 21 aprile 2009

Messaggi recenti

Mikko Torri:
Not yet.

I suspect it's in the indexer. It may not get the correct metadata fields and thus leaves them out from the query. Should be easy to patch using a hook, but haven't had time to look any deeper at the moment.

Mikko



Hi Mikko,

after some more trial on Liferay 6.1.1 GA2 seams to work. You can't specifiy if a Metadata it's indexable or not, it always index all metadata.
On Liferay 6.2 M4 I can confirm the issue.

Bye
Denis.
Mikko Torri
RE: Document Library metadata fields indexed but not searchable
15 aprile 2013 0.06
Risposta

Mikko Torri

Punteggio: Junior Member

Messaggi: 33

Data di Iscrizione: 9 maggio 2011

Messaggi recenti

Denis Signoretto:


Hi Mikko,

after some more trial on Liferay 6.1.1 GA2 seams to work. You can't specifiy if a Metadata it's indexable or not, it always index all metadata.
On Liferay 6.2 M4 I can confirm the issue.

Bye
Denis.


Hi Denis

That's not the issue. The issue is that while the extra metadata fields are indexed (as they should be) the search does not search from them.
So when performing the search, hits are not found in the extra metadata fields because the fields are not defined in the query passed to Lucene.

You can test this by adding a metadata field to a document => index => check with Luke that the added field is really indexed in the index => do basic search with the value of the added metadatafield => not found! => search for the field:value and it is found. To see which fields are searched in the index, turn on the " Display Main Query" checkbox.

Mikko
Florencia Gadea
RE: Document Library metadata fields indexed but not searchable
6 agosto 2013 9.05
Risposta

Florencia Gadea

Punteggio: Regular Member

Messaggi: 146

Data di Iscrizione: 27 marzo 2012

Messaggi recenti

Hi!

I have exactly the same problem.

Did you every find a solution to this?

Regards,

Flor.
Sai Sriharsha Kasturi
RE: Document Library metadata fields indexed but not searchable
11 marzo 2014 2.30
Risposta

Sai Sriharsha Kasturi

Punteggio: Junior Member

Messaggi: 30

Data di Iscrizione: 21 ottobre 2012

Messaggi recenti

Hi Mikko,

To achieve this, we have to modify the json configuration. Usually when we add any custom field it is indexed as /ddm/12345/fieldName
Here 12345 is the structure id of the document type and field name is the custom field name appended with language id. So, if you added a field called language, then it is indexed as /ddm/structureId of document type/language_en_US,ddm/structureId of document type//language_zh_CN and so on. Now you have to configure the json in the following way,

{
"displayStyle": "asset_tags",
"weight": 1.7,
"static": true,
"order": "OrderHitsDesc",
"data": {
"values": ["french","english"],
"frequencyThreshold": 0
},
"label": "Language",
"className": "com.liferay.portal.kernel.search.facet.MultiValueFacet",
"fieldName": "ddm/11813/language_en_US"
}

this gives the results based on custom field.
Giorgio Gosti
RE: Document Library metadata fields indexed but not searchable
3 luglio 2014 9.33
Risposta

Giorgio Gosti

Punteggio: New Member

Messaggi: 21

Data di Iscrizione: 26 giugno 2014

Messaggi recenti

Hi Sai Sriharsha,
do you know if the indexed works the same way in 6.2?
Thanks
Giacomo
Sai Sriharsha Kasturi
RE: Document Library metadata fields indexed but not searchable
5 novembre 2014 23.16
Risposta

Sai Sriharsha Kasturi

Punteggio: Junior Member

Messaggi: 30

Data di Iscrizione: 21 ottobre 2012

Messaggi recenti

Yes Giorgio it works the same way, I have practiced the same in Liferay 6.2