简体   繁体   English

如何在露天lucene搜索中查找标题为“ * .pdf”的文档

[英]How to find documents with title like “*.pdf” in alfresco lucene search

I need to restrict search to documents with title with suffix ".pdf" in JavaScript 我需要在JavaScript中将搜索限制为标题后缀为“ .pdf”的文档

Right now I add to the lucene search this: 现在,我在lucene搜索中添加以下内容:

ls += ' +@cm\\:title:"*\\.pdf" '

It almost does the job, but it also returns titles like: 它几乎可以完成工作,但是它还返回如下标题:

Cloud Strategy - Presentation (PDF)

What is the correct solution? 什么是正确的解决方案?

Have you tried with a simple: 您是否尝试过简单的方法:

ls += ' +@cm\\:title:".pdf" ';

It worked for me on a test example. 它对我来说是一个测试示例。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM