Foren

Home » Liferay Portal » English » 3. Development

Kombinierte Ansicht Flache Ansicht Baumansicht
Threads [ Zurück | Nächste ]
toggle
Mikko Torri
Document Library metadata fields indexed but not searchable
5. März 2013 06:08
Antwort

Mikko Torri

Rang: Junior Member

Nachrichten: 33

Eintrittsdatum: 9. Mai 2011

Neue Beiträge

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. März 2013 01:43
Antwort

Bart Simpson

Rang: Liferay Master

Nachrichten: 523

Eintrittsdatum: 29. August 2011

Neue Beiträge

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. März 2013 06:35
Antwort

Mikko Torri

Rang: Junior Member

Nachrichten: 33

Eintrittsdatum: 9. Mai 2011

Neue Beiträge

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. April 2013 01:31
Antwort

Denis Signoretto

Rang: Regular Member

Nachrichten: 214

Eintrittsdatum: 21. April 2009

Neue Beiträge

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. April 2013 01:18
Antwort

Mikko Torri

Rang: Junior Member

Nachrichten: 33

Eintrittsdatum: 9. Mai 2011

Neue Beiträge

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. April 2013 06:51
Antwort

Denis Signoretto

Rang: Regular Member

Nachrichten: 214

Eintrittsdatum: 21. April 2009

Neue Beiträge

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. April 2013 00:06
Antwort

Mikko Torri

Rang: Junior Member

Nachrichten: 33

Eintrittsdatum: 9. Mai 2011

Neue Beiträge

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. August 2013 09:05
Antwort

Florencia Gadea

Rang: Regular Member

Nachrichten: 145

Eintrittsdatum: 27. März 2012

Neue Beiträge

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. März 2014 02:30
Antwort

Sai Sriharsha Kasturi

Rang: New Member

Nachrichten: 6

Eintrittsdatum: 21. Oktober 2012

Neue Beiträge

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. Juli 2014 09:33
Antwort

Giorgio Gosti

Rang: New Member

Nachrichten: 14

Eintrittsdatum: 26. Juni 2014

Neue Beiträge

Hi Sai Sriharsha,
do you know if the indexed works the same way in 6.2?
Thanks
Giacomo