Welcome,
Guest
.
Please
login
or
register
.
Did you miss your
activation email
?
News:
Bug reports and fixes
.
Home
Help
Login
Register
Elxis CMS Forum
»
Support
»
General
(Moderators:
Ivan Trebješanin
,
Farhad Sakhaei
) »
Increasing the numbers of paths to images search folders
« previous
next »
Print
Pages: [
1
]
Author
Topic: Increasing the numbers of paths to images search folders (Read 4940 times)
maple
Full Member
Posts: 192
Increasing the numbers of paths to images search folders
«
on:
August 12, 2014, 14:28:44 »
Hi,
I just added up to 20 imatge folders path in the xml file images.engine.xml. I also change some "10" values in the images.engine.php turned to "20". But doesn't work. In which file can I turn 10 value to 20 ?
Perhaps this can increase the time of search results. I have only a very few images into each folder.
Thanks
«
Last Edit: August 12, 2014, 14:35:54 by maple
»
Logged
datahell
Elxis Team
Hero Member
Posts: 10356
Re: Increasing the numbers of paths to images search folders
«
Reply #1 on:
August 12, 2014, 19:35:03 »
You don't need to modify anything, undo your changes in XML file.
Go to
Extensions > Search engines
Click
Images
search engine to edit it.
On tab
Parameters
set the option
Limit
to anything you want
between 5 and 50
.
Save your settings.
«
Last Edit: August 12, 2014, 19:36:56 by datahell
»
Logged
Elxis Team
|
Is Open Source
|
IOS Rentals | IOS AERO
maple
Full Member
Posts: 192
Re: Increasing the numbers of paths to images search folders
«
Reply #2 on:
August 12, 2014, 21:44:20 »
Hi datahell, thanks for your response,
misunderstanding, i don't want "Number of items to display per page". Need about 20 folders path containing searchable items. Now I only can do up to 10 folders path.
thanks
Logged
datahell
Elxis Team
Hero Member
Posts: 10356
Re: Increasing the numbers of paths to images search folders
«
Reply #3 on:
August 12, 2014, 22:48:46 »
OK. Then edit the XML file and add 10 more folders in the list with the proper names.
<param type="text" name="dir11" default="" label="FOLDER_PATH" dir="ltr" size="40" description="" />
...
<param type="text" name="dir20" default="" label="FOLDER_PATH" dir="ltr" size="40" description="" />
Then open
images.search.php
and change line
45
from this:
for ($i = 1; $i < 11; $i++) {
to this:
for ($i = 1; $i < 21; $i++) {
That's all!
Logged
Elxis Team
|
Is Open Source
|
IOS Rentals | IOS AERO
maple
Full Member
Posts: 192
Re: Increasing the numbers of paths to images search folders
«
Reply #4 on:
August 13, 2014, 00:48:20 »
datahell
thank you! Yes the xml I already did. My problem was on line 45!
A question
What is best performance/quicker to take search results for images:
1 - put 2700 images into 1 folder
2 - put 54 images in 50 folders
3 - too few images to see differences
(at first sight, #2 is best)
Thanks
«
Last Edit: August 13, 2014, 00:55:32 by maple
»
Logged
datahell
Elxis Team
Hero Member
Posts: 10356
Re: Increasing the numbers of paths to images search folders
«
Reply #5 on:
August 13, 2014, 10:00:07 »
Image search engine uses "
glob
" php function. By default glob sorts results alphabetically which slows down the process. You can make it faster if you disable sorting (Elxis has custom sorting method) in glob by putting the
GLOB_NOSORT
flag.
$images = glob("{".$patdirs."}{".$pattype."}", GLOB_BRACE);
$images = glob("{".$patdirs."}{".$pattype."}", GLOB_BRACE | GLOB_NOSORT);
This should speed up search 20-40%.
As for the folders I believe putting them into 1 folder is faster as the function doesn't need to search in multiple paths. You can
enable performance monitor
in Elxis to see the difference. Make a test with the images in multiple folders and an other test with the images in one folder. The performance monitor will tell which method is faster. Run the tests multiple times and get the
average loading time
of component search or of the search engine.
If you have too many images you might consider the development of a custom search engine that indexes images and uses cache.
«
Last Edit: August 13, 2014, 10:05:39 by datahell
»
Logged
Elxis Team
|
Is Open Source
|
IOS Rentals | IOS AERO
Print
Pages: [
1
]
« previous
next »
Elxis CMS Forum
»
Support
»
General
(Moderators:
Ivan Trebješanin
,
Farhad Sakhaei
) »
Increasing the numbers of paths to images search folders