留言板

Document Library metadata fields indexed but not searchable

Mikko Torri,修改在11 年前。

Document Library metadata fields indexed but not searchable

Junior Member 帖子: 33 加入日期: 11-5-10 最近的帖子
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
thumbnail
Bart Simpson,修改在11 年前。

RE: Document Library metadata fields indexed but not searchable

Liferay Master 帖子: 522 加入日期: 11-8-29 最近的帖子
Did you try and modify the json configuration for facet? What is the field name that luke indicates.
Mikko Torri,修改在11 年前。

RE: Document Library metadata fields indexed but not searchable

Junior Member 帖子: 33 加入日期: 11-5-10 最近的帖子
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!
thumbnail
Denis Signoretto,修改在10 年前。

RE: Document Library metadata fields indexed but not searchable

Expert 帖子: 375 加入日期: 09-4-21 最近的帖子
I have the same issue, and I'm working on 6.1.1 GA2. Did you find any solution?

Thanks,
Denis.
Mikko Torri,修改在10 年前。

RE: Document Library metadata fields indexed but not searchable

Junior Member 帖子: 33 加入日期: 11-5-10 最近的帖子
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
thumbnail
Denis Signoretto,修改在10 年前。

RE: Document Library metadata fields indexed but not searchable

Expert 帖子: 375 加入日期: 09-4-21 最近的帖子
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,修改在10 年前。

RE: Document Library metadata fields indexed but not searchable

Junior Member 帖子: 33 加入日期: 11-5-10 最近的帖子
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
thumbnail
Florencia Gadea,修改在10 年前。

RE: Document Library metadata fields indexed but not searchable

Regular Member 帖子: 146 加入日期: 12-3-27 最近的帖子
Hi!

I have exactly the same problem.

Did you every find a solution to this?

Regards,

Flor.
thumbnail
Sai Sriharsha Kasturi,修改在10 年前。

RE: Document Library metadata fields indexed but not searchable

Junior Member 帖子: 34 加入日期: 12-10-21 最近的帖子
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.
Giacomo Castellini,修改在9 年前。

RE: Document Library metadata fields indexed but not searchable

New Member 帖子: 21 加入日期: 14-6-26 最近的帖子
Hi Sai Sriharsha,
do you know if the indexed works the same way in 6.2?
Thanks
Giacomo
thumbnail
Sai Sriharsha Kasturi,修改在9 年前。

RE: Document Library metadata fields indexed but not searchable

Junior Member 帖子: 34 加入日期: 12-10-21 最近的帖子
Yes Giorgio it works the same way, I have practiced the same in Liferay 6.2