# Basic Lucene Content Search configuration?

**URL:** <https://forum.pydio.com/t/basic-lucene-content-search-configuration/922>\
**Category:** Pydio 8\
**Created:** [March 26, 2018, 12:34pm UTC](https://forum.pydio.com/t/basic-lucene-content-search-configuration/922 "2018-03-26T12:34:36Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![Raker](https://avatars.discourse-cdn.com/v4/letter/r/ba9def/32.png) [@Raker](https://forum.pydio.com/u/Raker)\
**Post date:** [March 26, 2018, 12:34pm UTC](https://forum.pydio.com/t/basic-lucene-content-search-configuration/922/1 "2018-03-26T12:34:36Z")

</div>

Hi,

I’m having trouble with making Lucene Search work properly in Pydio.

I have created a workspace with .txt, and .docx files in it (I understand that docx are not indexed) however doesnt index txt either.

I enable “Lucene Indexing” in the Workspace configuration. I go to the workspace and I choose “Index Content”.

When I go to search \> advanced \> content search, I get no results for my queries. However I can search and find files when I choose filename search.

Then I read in the documentation: **"You must make sure to add a meta source “index.lucene” to the repositories that you want to be indexed."**

What does that mean, and could that be the cause? I simply do not know what is meant by repository (I know what a repo is, but is that in Pydio terms the workspace?)

I would really like to see a monkey-see, monkey-do description of how to make Lucene Search index the content of my text files. The current documentation seems like you have to be “in-the-know” to understand it. A Lucene / Pydio noob like me is dropped on the floor. 🙂

---

<div class="post-metadata">

**Author:** ![Raker](https://avatars.discourse-cdn.com/v4/letter/r/ba9def/32.png) [@Raker](https://forum.pydio.com/u/Raker)\
**Post date:** [March 28, 2018, 9:24am UTC](https://forum.pydio.com/t/basic-lucene-content-search-configuration/922/2 "2018-03-28T09:24:20Z")

</div>

Anyone?

- I have enabled Lucene Search on Workspace.
- Create .txt file with test content to search on.
- Pressed “Index Content” on Workspace
- Searched on content using Content Search (More search options).

No result!

---

<div class="post-metadata">

**Author:** ![romoloman](https://avatars.discourse-cdn.com/v4/letter/r/a6a055/32.png) [@romoloman](https://forum.pydio.com/u/romoloman)\
**Post date:** [March 28, 2018, 9:43am UTC](https://forum.pydio.com/t/basic-lucene-content-search-configuration/922/3 "2018-03-28T09:43:28Z")

</div>

did you configured the lucene engine in the plugins ?

---

<div class="post-metadata">

**Author:** ![Raker](https://avatars.discourse-cdn.com/v4/letter/r/ba9def/32.png) [@Raker](https://forum.pydio.com/u/Raker)\
**Post date:** [March 28, 2018, 12:13pm UTC](https://forum.pydio.com/t/basic-lucene-content-search-configuration/922/4 "2018-03-28T12:13:27Z")

</div>

![image](https://canada1.discourse-cdn.com/flex032/uploads/pydio/original/1X/f78daca45cfdc31ad1d1b9d3808438498a1a8331.png)

This is how the configuration looks. The plugin is enabled.

And on the Workspace i’m testing

 ![image](https://canada1.discourse-cdn.com/flex032/uploads/pydio/original/1X/a3995c28ea8f4029e80cd17791d2f88c86bfb151.png)

What I may be doing wrong is the “be sure to add index.lucene to the repository part”. I didnt really understand that. So i tried adding an empty index.lucene to the workspace path. I also tried adding an empty file called .ajxp\_meta and adding the line “index.lucene”. Didn’t work.

---

<div class="post-metadata">

**Author:** ![romoloman](https://avatars.discourse-cdn.com/v4/letter/r/a6a055/32.png) [@romoloman](https://forum.pydio.com/u/romoloman)\
**Post date:** [March 28, 2018, 12:22pm UTC](https://forum.pydio.com/t/basic-lucene-content-search-configuration/922/5 "2018-03-28T12:22:58Z")

</div>

for .doc and docx files you must include the unoconv configuration,  
for pdf ones you need pdftotext  
considering a doc or a docx as a .txt file may bring to corrupted indexes…  
In the documentation of the lucene plugin (reported in the configuration page) is clearly written that to index that sort of file you need extra components.

---

<div class="post-metadata">

**Author:** ![Raker](https://avatars.discourse-cdn.com/v4/letter/r/ba9def/32.png) [@Raker](https://forum.pydio.com/u/Raker)\
**Post date:** [March 28, 2018, 12:36pm UTC](https://forum.pydio.com/t/basic-lucene-content-search-configuration/922/6 "2018-03-28T12:36:23Z")

</div>

Yeah, I understood that actually. However I have, as mentioned, created a .txt file as well with some words in it, that neither is indexed.

---

<div class="post-metadata">

**Author:** ![romoloman](https://avatars.discourse-cdn.com/v4/letter/r/a6a055/32.png) [@romoloman](https://forum.pydio.com/u/romoloman)\
**Post date:** [March 28, 2018, 12:43pm UTC](https://forum.pydio.com/t/basic-lucene-content-search-configuration/922/7 "2018-03-28T12:43:24Z")

</div>

The txt file should have been indexed but if the index is already compromised the results can be wrong.  
I’m pretty sure that in my installation (made from scratch) lucene is actually working even in PDF and doc files not only in .txt ones.

---

<div class="post-metadata">

**Author:** ![Raker](https://avatars.discourse-cdn.com/v4/letter/r/ba9def/32.png) [@Raker](https://forum.pydio.com/u/Raker)\
**Post date:** [March 28, 2018, 12:46pm UTC](https://forum.pydio.com/t/basic-lucene-content-search-configuration/922/8 "2018-03-28T12:46:38Z")

</div>

Hmmm… Can you help me understand the index.lucene part?

---

<div class="post-metadata">

**Author:** ![romoloman](https://avatars.discourse-cdn.com/v4/letter/r/a6a055/32.png) [@romoloman](https://forum.pydio.com/u/romoloman)\
**Post date:** [March 28, 2018, 12:58pm UTC](https://forum.pydio.com/t/basic-lucene-content-search-configuration/922/9 "2018-03-28T12:58:45Z")

</div>

Indexes are saved in the cache directory of your installation: ./data/cache/indexes (depending on your settings)  
If an index get corrupted search on that index does not works anymore.  
I’m not sure whenever a index command actually drops and recreate the index or just updates diffs.

---

<div class="post-metadata">

**Author:** ![Raker](https://avatars.discourse-cdn.com/v4/letter/r/ba9def/32.png) [@Raker](https://forum.pydio.com/u/Raker)\
**Post date:** [March 28, 2018, 1:28pm UTC](https://forum.pydio.com/t/basic-lucene-content-search-configuration/922/10 "2018-03-28T13:28:14Z")

</div>

Interesting, I located the folder. Deleted all the indexes, re-ran indexation and I can see new files were created.

2\_1.del  
\_2.sti  
\_3.sti  
read.lock.file  
segments\_6  
write.lock.file  
\_2.cfs  
\_3.cfs  
optimization.lock.file  
read-lock-processing.lock.file  
segments.gen

However the only indexation I get from search, is by filename. Content search simply doesn’t work for me.

---

<div class="post-metadata">

**Author:** ![Raker](https://avatars.discourse-cdn.com/v4/letter/r/ba9def/32.png) [@Raker](https://forum.pydio.com/u/Raker)\
**Post date:** [March 28, 2018, 1:30pm UTC](https://forum.pydio.com/t/basic-lucene-content-search-configuration/922/11 "2018-03-28T13:30:20Z")

</div>

Pydio documentation says: “You must make sure to add a meta source “index.lucene” to the repositories that you want to be indexed.”

I’m still looking for an answer to understand that part. How do I add a meta source to the repository?

---

<div class="post-metadata">

**Author:** ![romoloman](https://avatars.discourse-cdn.com/v4/letter/r/a6a055/32.png) [@romoloman](https://forum.pydio.com/u/romoloman)\
**Post date:** [March 28, 2018, 2:44pm UTC](https://forum.pydio.com/t/basic-lucene-content-search-configuration/922/12 "2018-03-28T14:44:32Z")

</div>

You must enter in settings, select the workspace, on the left there is a part named Additional features  
You must be sure that:  
Lucene Search engine is listed in that section

after that you must click Lucene search Engine and verify that the switch Index Content is enabled.

---

<div class="post-metadata">

**Author:** ![Raker](https://avatars.discourse-cdn.com/v4/letter/r/ba9def/32.png) [@Raker](https://forum.pydio.com/u/Raker)\
**Post date:** [March 28, 2018, 7:44pm UTC](https://forum.pydio.com/t/basic-lucene-content-search-configuration/922/13 "2018-03-28T19:44:19Z")

</div>

Everything mentioned is enabled. If that is all you had to do, to make it work, then I guess I’m out of luck.

---

<div class="post-metadata">

**Author:** ![Raker](https://avatars.discourse-cdn.com/v4/letter/r/ba9def/32.png) [@Raker](https://forum.pydio.com/u/Raker)\
**Post date:** [March 28, 2018, 7:54pm UTC](https://forum.pydio.com/t/basic-lucene-content-search-configuration/922/14 "2018-03-28T19:54:03Z")

</div>

Okay, found the solution. I feel like screaming.

Apparently a workspace is not a repository. However a folder inside a workspace is a repository (i have no idea why this is not mentioned in the docs).

So if I create a folder, put a txt file in it, the contents are indexed.

Thanks for your support romoloman. You already helped me once, with the Collabora Online. \<3

---

<div class="post-metadata">

**Author:** ![Raker](https://avatars.discourse-cdn.com/v4/letter/r/ba9def/32.png) [@Raker](https://forum.pydio.com/u/Raker)\
**Post date:** [March 28, 2018, 8:43pm UTC](https://forum.pydio.com/t/basic-lucene-content-search-configuration/922/15 "2018-03-28T20:43:25Z")

</div>

Just a quick update. Since the indexer, doesnt parse docx files. It wont event index their filenames. So I end up deciding to disable indexing content. Now I can at least search on all filenames.

---

<div class="post-metadata">

**Author:** ![romoloman](https://avatars.discourse-cdn.com/v4/letter/r/a6a055/32.png) [@romoloman](https://forum.pydio.com/u/romoloman)\
**Post date:** [March 29, 2018, 6:07am UTC](https://forum.pydio.com/t/basic-lucene-content-search-configuration/922/16 "2018-03-29T06:07:43Z")

</div>

for docs files (docx, doc, odt, xls, ods, ppt, odp) the solution is simple:

UNICONV + XPDF INTEGRATION  
If you can install the uniconv utilitary on your server, along with the openoffice or libreoffice headless suite, and the xpdf utilitary, the plugin will be able to extract and index textual contents from office documents (Word,Excel,Powerpoint and all their closed or open-source variants).  
On ubuntu 16.04:  
apt-get install unoconv xpdf

for pdf files you need to install pdftotext

---

<div class="post-metadata">

**Author:** ![Raker](https://avatars.discourse-cdn.com/v4/letter/r/ba9def/32.png) [@Raker](https://forum.pydio.com/u/Raker)\
**Post date:** [April 6, 2018, 8:59am UTC](https://forum.pydio.com/t/basic-lucene-content-search-configuration/922/17 "2018-04-06T08:59:26Z")

</div>

Yeah already tried that. Unfortunately without success. Did everything according to the configuration. Binaries are installed. Paths are entered in Pydio. Pydio runs with a user that can access the binaries. I click launch indexation, search and more, enter string i content field. No results.
