• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer
sharadchhetri.com

sharadchhetri.com

Linux,Cloud Computing And DevOps

  • Home
  • Linux
  • CloudComputing
    • Introduction Cloud Computing
    • Amazon AWS
  • Free E-Books
  • About Me

Reindex lucene search in owncloud 5.0.22

November 15, 2013 by Sharad Chhetri Leave a Comment

In this post we will learn about how to reindex lucene search in Owncloud 5.0.22. While working in Owncloud 5.0.22 our requirement was to reindex the lucene search.

Overview: When a user placed a cursor and type some keyword ,bydefault it creates a directory lucene_index (absolute path is /path/of/owncloud_installed_dir/data/username/lucene_index ) . On writing the keyword in search box in owncloud, inside lucene_index directory some files will be created.The below given 4 files get created on initial stage and after indexing some more files will be created inside lucene_index directory and some files name will also start with underscore ( _ ).

The below given 4 files will be created when lucene search script start doing indexing.

read.lock.file
segments_1
segments.gen
write.lock.file

After proper indexing some more files will be created(Note: the number of files may vary in case to case scenario.)
Below given is specimen from my Owncloud Server:

root@owncloud-server:/var/www/owncloud/data/sharad# ls -l lucene_index/
total 240
-rwxrwx--- 1 www-data www-data  435 2013-11-14 17:15 _10.cfs
-rwxrwx--- 1 www-data www-data  107 2013-11-14 17:15 _10.sti
-rwxrwx--- 1 www-data www-data  450 2013-11-14 17:15 _11.cfs
-rwxrwx--- 1 www-data www-data  107 2013-11-14 17:15 _11.sti
-rwxrwx--- 1 www-data www-data  511 2013-11-14 17:15 _12.cfs
-rwxrwx--- 1 www-data www-data  107 2013-11-14 17:15 _12.sti
-rwxrwx--- 1 www-data www-data  515 2013-11-14 17:15 _13.cfs
-rwxrwx--- 1 www-data www-data  107 2013-11-14 17:15 _13.sti
-rwxrwx--- 1 www-data www-data  527 2013-11-14 17:15 _14.cfs
-rwxrwx--- 1 www-data www-data  107 2013-11-14 17:15 _14.sti
-rwxrwx--- 1 www-data www-data  528 2013-11-14 17:15 _15.cfs
-rwxrwx--- 1 www-data www-data  107 2013-11-14 17:15 _15.sti
-rwxrwx--- 1 www-data www-data  499 2013-11-14 17:15 _16.cfs
-rwxrwx--- 1 www-data www-data  107 2013-11-14 17:15 _16.sti
-rwxrwx--- 1 www-data www-data  497 2013-11-14 17:15 _17.cfs
-rwxrwx--- 1 www-data www-data 2359 2013-11-14 17:15 _18.cfs
-rwxrwx--- 1 www-data www-data 1773 2013-11-14 17:14 _b.cfs
-rwxrwx--- 1 www-data www-data  107 2013-11-14 17:14 _b.sti
-rwxrwx--- 1 www-data www-data 2046 2013-11-14 17:14 _m.cfs
-rwxrwx--- 1 www-data www-data  107 2013-11-14 17:14 _m.sti
-rwxrwx--- 1 www-data www-data    0 2013-11-14 17:15 optimization.lock.file
-rwxrwx--- 1 www-data www-data    0 2013-11-14 17:15 read.lock.file
-rwxrwx--- 1 www-data www-data    0 2013-11-14 17:15 read-lock-processing.lock.file
-rwxrwx--- 1 www-data www-data  127 2013-11-14 17:15 segments_1d
-rwxrwx--- 1 www-data www-data   20 2013-11-14 17:15 segments.gen
-rwxrwx--- 1 www-data www-data  521 2013-11-14 17:14 _w.cfs
-rwxrwx--- 1 www-data www-data    0 2013-11-14 17:15 write.lock.file
-rwxrwx--- 1 www-data www-data  107 2013-11-14 17:14 _w.sti
-rwxrwx--- 1 www-data www-data 2426 2013-11-14 17:14 _x.cfs
-rwxrwx--- 1 www-data www-data  107 2013-11-14 17:14 _x.sti
-rwxrwx--- 1 www-data www-data  451 2013-11-14 17:14 _y.cfs
-rwxrwx--- 1 www-data www-data  107 2013-11-14 17:15 _y.sti
-rwxrwx--- 1 www-data www-data  419 2013-11-14 17:15 _z.cfs
-rwxrwx--- 1 www-data www-data  107 2013-11-14 17:15 _z.sti

Reindex lucene search in owncloud 5

The given below are details of owncloud server,replace the values as per your server information

MySQL Server Host : localhost (replace with your server FQDN or ip address)
MySQL Database Name : owncloud
MySQL user name : ownclouduser [this is owncloud application’s database user] (or use root)
Table on which we will work : oc_lucene_status and oc_filecache.

Note: Here oc_lucene_status table will play important role.

Step 1: login into your mysql server and give password of MySQL user when it will ask.

mysql -u ownclouduser -h localhost -p 

Step 2: After login into MySQL server, connect to owncloud database

mysql > use owncloud ;

Step 3 : Now clear the oc_lucene_status table. (Reference from Owncloud GitHub)

You can use any one method for clearing the oc_lucene_status table.

(Method 1)

mysql > DELETE FROM oc_lucene_status WHERE 1=1;

OR

(Method 2)

mysql > truncate oc_lucene_status;

Step 4: As I was working in more than 100Gb data in owncloud I faced some issues in lucene indexing and file cacheing. Hence cleared the oc_filecache table as well removed cache and lucene_index directory from username directory.

mysql> truncate oc_filecache;
mysql> exit

In below command,replace the username with your owncloud login user name and also replace the installed owncloud path with /var/www/owncloud

rm -fr /var/www/owncloud/data/username/cache

rm -fr /var/www/owncloud/data/username/lucene_index

Step 5: Now open the web browser and type your owncloud server URL.Login into with your user

http://owncloudserver-ipaddress-or-domain-name

For eg.

http://localhost/owncloud

After login now go to search box and type keyword,you will get loader image rotating,which means indexing has been started. You have to wait and must have patience also.Sometimes it do not show indexing suddenly,in my case I had to wait maximum 15-20 minutes because I has 2-5 GB of data in single user account.

Logout and login back and check once again typing keyword in search box.

Below screenshot is reference:

owncloud-indexing

Do'nt be greedy, share the knowledge!

  • Click to share on Facebook (Opens in new window)
  • Click to share on WhatsApp (Opens in new window)
  • Click to share on Twitter (Opens in new window)
  • Click to share on Pinterest (Opens in new window)
  • Click to share on Reddit (Opens in new window)
  • Click to share on Pocket (Opens in new window)
  • Click to share on LinkedIn (Opens in new window)

Related

Filed Under: Linux, owncloud Tagged With: owncloud

Reader Interactions

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Primary Sidebar

Follow Us

  • Facebook
  • Twitter
  • GitHub
  • YouTube

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Handpicked Posts

  • terraform

    how to install terraform in Linux : CentOS-Ubuntu

  • docker image

    How to create Ubuntu docker base image

  • install ansible

    Install Ansible in Ubuntu 18.04 LTS with pip3

  • Install Ansible on Ubuntu / CentOS / RHEL

Top Posts & Pages

  • How to delete mail queue in Postfix
  • How to start / stop / restart / reload iptables on CentOS 7 / RHEL 7
  • How to setup Jenkins Credentials for Git repo access
  • How to install MySQL Server 5.6 on CentOS 7 / RHEL 7
  • How to set hostname and FQDN on CentOS 7 and RHEL 7
  • 4 different commands to check the load average in linux
  • How to fix read only USB pen drive in Ubuntu
  • How to find absolute path of command on Linux / Unix : which command
  • How to zip the directory in linux with command line
  • How to print particular line number by using sed command

Recent Posts

  • Install Docker on CentOS 7
  • Install and setup maven in Linux for Jenkins
  • How to setup Jenkins Credentials for Git repo access
  • How to manage Jenkins Credentials
  • Managing Jenkins plugins from command line and GUI

Footer

Sharad Chhetri is an experienced Linux - Cloud Engineer & freelancer. Working on Open Source Technology since RHEL 4.0 (Red Hat Enterprise Linux). He loves sharing the knowledge which earned from real scenarios. Don't be surprised if you find him in technology seminars and meetup groups. You can contact him on email for freelance projects at admin@sharadchhetri.com. Read More…

Help To Needy

If you like our posts and tutorials, please support/donate to ANY “Open Source Project” or do some Charity work. Hope this will make someone happy in this world. Drop me an email if you want to inspire others!

Thank You!

Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
To find out more, including how to control cookies, see here: Cookie Policy

Our GitHub Repo

sharadchhetri @ GitHub
  • scripts
    Cassandra Backup Script
    September 22, 2019 - 11:51 pm UTC
  • aws
    AWS related stuff like Cloudformation, python boto3 scripts etc.
    August 3, 2019 - 2:45 am UTC
  • cf-prometheus
    prometheus-2.11.1.linux-amd64 for Cloudfoundry
    July 22, 2019 - 9:04 am UTC
  • tomcat

    June 13, 2019 - 12:20 pm UTC
  • maven-sample
    Maven Sample repo
    June 13, 2019 - 10:01 am UTC

Recent Comments

  • Suhas on System settings not opening on Ubuntu 16.04 LTS
  • Kuldeep on How to install own git server with ssh and http access by using gitolite and gitweb in CentOS
  • DD on convert space into new line using sed command
  • Andrew on How to fix read only USB pen drive in Ubuntu
  • ari on Squid proxy server to block websites listed in file
  • Michael on Managing Jenkins plugins from command line and GUI
  • Sharad Chhetri on Secondary Logging : save all users history command output as log
  • Datta on How to fix read only USB pen drive in Ubuntu

Copyright © 2009 - 2019 · All Rights Reserved sharadchhetri.com · · Privacy Policy ·
· sitemap.xml · ·The content is copyrighted to sharadchhetri.com and may not be reproduced on other websites without our permission. ·

Copyright © 2019 · Genesis Sample on Genesis Framework · WordPress · Log in