Multi sort in GSA - google-search-appliance

Is that even possible?
Foe example, I have the following records,
<MT N="ORDER_number" V="123"/>
<MT N="Document_TypeE" V="abc"/>
<MT N="ORDER_number" V="011"/>
<MT N="Document_TypeE" V="bbc"/>
<MT N="ORDER_number" V="011"/>
<MT N="Document_TypeE" V="abc"/>
<MT N="ORDER_number" V="121"/>
<MT N="Document_TypeE" V="abc"/>
<MT N="ORDER_number" V="022"/>
<MT N="Document_TypeE" V="bbc"/>
<MT N="ORDER_number" V="125"/>
<MT N="Document_TypeE" V="bbc"/>
and the desired sort order is below,
<MT N="ORDER_number" V="011"/>
<MT N="Document_TypeE" V="abc"/>
<MT N="ORDER_number" V="121"/>
<MT N="Document_TypeE" V="abc"/>
<MT N="ORDER_number" V="123"/>
<MT N="Document_TypeE" V="abc"/>
<MT N="ORDER_number" V="011"/>
<MT N="Document_TypeE" V="bbc"/>
<MT N="ORDER_number" V="121"/>
<MT N="Document_TypeE" V="bbc"/>
<MT N="ORDER_number" V="125"/>
<MT N="Document_TypeE" V="bbc"/>
sort=meta:order_number.meta:documenttypeE <-- Is this even possible? to do multi-level sorting like this? Documentation does not say a way to do this. So I'm assuming this is not possible in GSA. Is my understanding correct?

Sorry,
Multi-dimensional search is not available on the GSA

Related

Adding trailing slash to sitemap

Would it be possible to add a trailing slash on the sitemap?
For example my current sitemap :
<url>
<loc>
https://www.website.com.au/shop/category/laser-therapy/capillus272-laser-cap
</loc>
<lastmod>2018-09-24T10:12:15+09:30</lastmod>
<changefreq>weekly</changefreq>
<priority>0.5</priority>
I want to add a trailing slash on this part https://www.website.com.au/shop/category/laser-therapy/capillus272-laser-cap
Is this possible?
Thanks!
That would certainly be possible. in yor template that generates the xml file, do something like:
<loc>
{page_url}/
</loc>

how to make multi site with one codeigniter application?

I'm trying to develop a shopping system with codeigniter.
I developing the back-end & front-end of my shopping system.
But my problem is I want to use this code for many stores.
For example my main address is shop.com.
I want people can have their own shop in my system with their own subfolder like this: shop.com/shop1 | shop.com/shop2 & ...
I want the users subfolder placed out of application folder.
My directory list like this:
shop.com
-application
--cache
--config
--controllers
--core
--helpers
--...(other application contents)
-assets
-attachments
-system
-shop1
-shop2
& ...
I making all shop parts and every thing is ok when i call shop.com.
Now I want to making shop1 with specific subfolder and database.
I can making separate database for each shop and connect the code to his own database. after this I call shop.com/shop1 and the main page load like a charm.
But when I call shop controllers ( example: shop.com/shop1/checkout ) I get 404 error.
And at the end I noticed two point:
1- I use the original codeigniter root index.php code as my shop1/index.php
2- I change the $system_path to ../system and $application_folder to ../application
It seems codeigniter unable to locate the controllers properly.
What can I do to solving this problem?
You mean HMVC?
Download files and copy C.i.3.0 forder in application : https://bitbucket.org/wiredesignz/codeigniter-modular-extensions-hmvc/downloads
Create and coppy paste in .htaccess
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
3.Create folder name 'modules' in application/
4.Create folder name 'folder' in application/modules
4.Create folder name 'controllers, models, views' in application/modules/folder
5.Create file name 'file name same folder' in application/modules/folder/controllers
for error
paste this in MX/Loder.php
return $this->_ci_load(array('_ci_view' => $view, '_ci_vars' => $this->_ci_prepare_view_vars($vars), '_ci_return' => $return));

XPath Like Regex One or More

I want to select something is a child of 1 to N of the same kind of nodes nested. The xml would look something like this:
<Folder>
<Folder>
<Folder>
<Folder>
<File></File>
</Folder>
</Folder>
</Folder>
</Folder>
or
<Folder>
<File></File>
</Folder>
The Files I am selecting must be a child of folder and none of those folders can have anything other than a folder as an ancestor. I don't want to use descendants to get all Files only to check each of their ancestors. I would rather follow the Folder chain and then stop at any Files directly after a Folder. Something like regex's + is what I'm looking for (./Folder+/File) but I don't know what that syntax is if it exists.
XPath has no "repeating axis" construct; you'll need to use a combination of the XPath axes and predicate conditions to achieve your desired result.
Here's an expression that gets all File elements that are children of Folder elements, and then checks that the Folder element's ancestors are all Folder elements:
//Folder/File[fn:not(ancestor::*/fn:local-name(.) != "Folder")]

.htaccess RewriteRule for change the path if a word appears in the path

:-)
I need a .htaccess RewriteRule that can do this:
If the browser load this url path:
http://www.domain.com/example/word_to_change/
change to
http://www.domain.com/example/new_word/
take a look that the "word_to_change" and "new_word" appears in the third level in the path
I was tried this:
RewriteRule ^(word_to_change/)?$ /new_word/ [R,L]
But only works if the "word_to_change" appears in the second level, not in the third.
thanks for your help! :)
ADDED:
three examples:
need to change
http://www.domain.com/second_level_with_any_word/specific_word_1 or
http://www.domain.com/example_1/specific_word_1 or
http://www.domain.com/example_2/specific_word_1
to
http://www.domain.com/second_level_anything/specific_word_2 or
http://www.domain.com/example_1/specific_word_2 or
http://www.domain.com/example_2/specific_word_2
maybe is mor simple for explain with this other example:
http://*/*/specific_word1
for
http://*/*/specific_word2
This depends on what to acomplish, if you want to change ANY word that apeaers after example with a SPECIFIC word then what you need is:
RewriteRule ^example/(.*) /new_path/ [R,L]
if you want to pass that word as a paramater you can use
RewriteRule ^example/(.*) /new_path/process.php?word=$1 [R,L]
if you want to send any URL that ends with a specific word try this
RewriteRule ^(.*)/old_word/$ /$1/new_word/ [R,L]

Directory Structure and Mod_Rewrite

I designed a php/mysql/query based on the idea of a subdirectory per function, so my directory structure looks like this:
public_html\
..users\ (all user related files are in this folder)
..events\ (all event related files are in this folder)
..groups\ (all group related files are in this folder)
..layouts\ (global header, global footer, and global navigation include files are in here)
Any pages in the users,events or groups folder include the header, footer and navigation files so they all keep a theme. Because of this the navigation file has all links set to
../functionfolder/file.php" and it works out because you are usually in one of the function folders.
But I forgot the index file in the public_html, when I include my headers, footers and nav from that directory (not being a sub folder) the "../"'s mess every thing up.
I have already created a separate navigation file that will make files in the high level directory work but I realized that all of my pictures and script includes are messed up.
(created a separate nav include with no ".."'s)
What I think may be a solution:
do not use a index.php file home director but create a directory named home and place the index file in there so everything will work out.
(public_html/home/index.php vs public_html/index.php)
(not sure how that would work out with the domain)
I have also looked at absolute vs relative links but they end up being a mess working on my computer then uploading them??
Anyone have an Ideas that can help?
Update:
would something like this work?
# Turn on rewrites.
RewriteEngine on
# Only apply to URLs on this domain
RewriteCond %{HTTP_HOST} ^(www.)?domain.com$
# Only apply to URLs that aren't already under folder.
RewriteCond %{REQUEST_URI} !^/folder/
# Don't apply to URLs that go to existing files or folders.
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# Rewrite all those to insert /folder.
RewriteRule ^(.*)$ /folder/$1
# Also redirect the root folder.
RewriteCond %{HTTP_HOST} ^(www.)?domain.com$
RewriteRule ^(/)?$ folder/index.php [L]

Resources