Forum

JiFile for Joomla!

JIFile
JiFile is a component for Joomla! that allows you to index file contents (PDF, DOC, etc..) to perform searches in them.

Learn more...  Demo

JoomPhoto Mobile

JPhotoMobile
JoomPhoto Mobile is a component for Joomla! that allows you to share the photos from your Android device to your site Joomla.

Learn more...  Demo

iFile Framework

IFile
IFile is an open source framework written entirely in PHP, allows the indexing of textual content of a document (DOC, PDF, EXCEL, etc.) and a quick search within them.

Learn more...  Demo

Easy Language

EasyLanguage
Easy Language is a plugin for easy and immediate management of multilingual texts in every possible area of joomla, articles, components, modules, metadata, template, other components(example K2) etc.

Learn more...

Article Book Effect

Article Book Effect
View Joomla articles with the effect turns the page of a book. This plugin will display the contents of an article in Joomla as a real book or magazine, using all the benefits of HTML5

Learn more...  Demo

 

Passport photo

Passport photo
The most popular Android app that allows you to print photos cards for your documents with your Android smartphone, in a simple and intuitive way.

Learn more...

 

Crazy Shadow

Crazy Shadow
Crazy Shadow is the 3D fast-paced and fun puzzle Android game! Try to rotate and drag shapes in the position of their shadows without fail! Solve in succession all combinations of levels of the game.

Learn more...

 

Admin Countdown

Admin Countdown
Module for Joomla! 2.5 and 3.x displays in the administration part of the site, a timer with countdown of the time remaining in your session.

Learn more...  Demo

 
Welcome, Guest
Username: Password: Remember me

TOPIC: Optimize call in lucene.php

Optimize call in lucene.php 10 Feb 2012 17:51 #185

  • Zachary
  • Zachary's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 7
  • Thank you received: 5
Thought I'd post back a quick change I made in the local version.

After removing a file from being indexed it seemed that it was always necessary to optimize. I modified the delete function to call the optimize function before ending to remove 1 extra click.

File is located under the model directory and is called lucene.php
public function delete($id) {
		if($id !== false) {
			$lucene = $this->getIndex();
			$lucene->delete($id);
			$lucene->commit();
			$doc = $lucene->getDocument($id);
			jifilehelper::deleteFileCache($doc->getFieldValue('filename'));
			jifilehelper::clearCache(array('lucene'));
            $this->optimize();
		} else {
			return false;
		}
	}
Last Edit: 10 Feb 2012 17:53 by Zachary.
The administrator has disabled public write access.
The following user(s) said Thank You: Antonio

Re: Optimize call in lucene.php 11 Feb 2012 17:11 #187

  • Giampaolo
  • Giampaolo's Avatar
  • OFFLINE
  • Administrator
  • Posts: 465
  • Thank you received: 42
This is a good idea, but "optimize" method is very slow if you have a big number of document in index.
So we've decided not to call the "optimize" method, after each deletion of a single document.
If you like, if it was useful, consider a donation, Thanks
Se vuoi, se ti siamo stati utili, considera una donazione, Grazie
Help us by voting our extensions on Joomla.org:
JiFile
JoomPhoto Mobile
Easy Language
The administrator has disabled public write access.

Re: Optimize call in lucene.php 13 Feb 2012 16:35 #188

  • Zachary
  • Zachary's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 7
  • Thank you received: 5
What happens if you don't optimize? Does the search get slower, take more processing or such? Do you know if this is more processing than optimizing a large grouping of files?
The administrator has disabled public write access.

Re: Optimize call in lucene.php 14 Feb 2012 11:16 #192

  • Giampaolo
  • Giampaolo's Avatar
  • OFFLINE
  • Administrator
  • Posts: 465
  • Thank you received: 42
Hi,
if you do not optimize your index, the search is slower.

In the control panel JiFile, there is a control to optimize or not optimize your index (see picture).

This image is hidden for guests. Please log in or register to see it.
If you like, if it was useful, consider a donation, Thanks
Se vuoi, se ti siamo stati utili, considera una donazione, Grazie
Help us by voting our extensions on Joomla.org:
JiFile
JoomPhoto Mobile
Easy Language
The administrator has disabled public write access.

Re: Optimize call in lucene.php 21 Feb 2014 23:56 #1663

  • Daliana
  • Daliana's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 5
Hello, following the thread of this conversation, I have a problem with the optimization option. When I click on this function to update the indexes erased does nothing, any idea of what can be happened? Please any help?
Attached images to better understand what happens to me.
Attachments:
  • Attachment This image is hidden for guests. Please log in or register to see it.
  • Attachment This image is hidden for guests. Please log in or register to see it.
The administrator has disabled public write access.