-
Notifications
You must be signed in to change notification settings - Fork 113
Tips for working with Quepid
Eric Pugh edited this page Jul 29, 2025
·
38 revisions
- Did you know you can add multiple queries at once by separating them with a
;character? Go ahead and try outstar wars;star trekin the Add Query field. - When importing CSV files with special characters like á, make sure to use UTF-8 encoding.
- Want to disable the snippeting that Quepid does on a long field? Specify that you want the unabridged content via
unabridged:body_text. - You can add a thumbnail image to each document result via
thumb:poster_path, this assumes you have the full url in the fieldposter_pathin your document. If you have a RELATIVE url, then you can specify your http root via some json:{"name": "poster_path", "type":"thumb", "prefix": "https://www.example.org/images/thumbs"}in place ofthumb:poster_path. If you have multiple images, then please reindex one image as your "hero" image and reference that. - You can add a larger image to each document result via
image:poster_path, this assumes you have the full url in the fieldposter_pathin your document. If you have a RELATIVE url, then you can specify your http root via some json:{"name": "poster_path", "type":"image", "prefix": "https://www.example.org/images"}in place ofimage:poster_path. If you have multiple images, then please reindex one image as your "hero" image and reference that. - If you have an audio/image/video URL, you can embed in in the result listing via
media:field_name - Sometimes you need to look at the original document. If your field value starts with the string
httporhttpsthen it will be turned into a clickable link. - Want to see the output of a function as a field? Just add the function name to the field list, like
id title geodist()and the function will run. Sadly, aliasing field names isn't supported, likedistance:geodist(). - Do you have a nested JSON document in your results like
{ "variants": [ { "name": "red" }, { "name": "blue" } ] }? Specify your field asvariants.nameand it will pluck out the values red,blue from the array. If you have{ "actor": { "name": "bob hope", "id":52 } }you can doactor.nameto just get the name. - If you ever run into a situation with Quepid refusing to start / respond due to
Unknown database: 'quepid', and you are using docker, it might be that the mysql database is not stored on the volume in the expected location (volumes/mysql_data/quepid) on your disk. Instead, it can be inside the docker image that had been running Quepid instance last. So, if you are not an expert in docker (like me), you can try your luck by grep'ingquepidin/var/lib/docker/volumes/. Something like this should do:grep -r quepid /var/lib/docker/volumes/. If grep outputs some files likequepid/, take a note of the path, cd in there and observe the directory. It should have the files like:ib_logfile1 performance_schema/ auto.cnf mysql/ ib_logfile0 ibdata1 quepid/Copy these files and directories into the expected location likevolumes/mysql_data/quepidand start your quepid application with mysql and redis.
A crazy use of a custom scorer is to change the Quepid UI! Since a Custom Scorer is JavaScript, it can manipulate the actual Quepid site!
Here is an example of making a relative URL that is in your search engine document a fully qualified URL:
window.onclick = function(event) {
if(event.target.classList.contains('toggleSign') || event.target.classList.contains('query')) {
var url;
$(".subLabel").each(function(){
console.log("Here we are:" + $(this).text());
if($(this).text().indexOf("relative_image_url") > -1 ) {
url = $(this).next().text();
if(url !== undefined && url.indexOf("http") == -1) {
$(this).next().html("<a target='_blank' href='https://i.imgur.com" + url +"'>https://i.imgur.com" + url + "</a>");
}
}
});
}
};
Here is an example of modifying the image thumbnail to provide a full link!
window.onclick = function(event) {
//console.log(event.target.classList);
if(event.target.classList.contains('toggleSign') || event.target.classList.contains('query')) {
var imgUrl;
$(".img-thumbnail").each(function(){
imgUrl = $(this).attr("src");
if(imgUrl !== undefined && imgUrl.indexOf("http") == -1)
{
$(this).attr("src", "https://i.imgur.com" + $(this).attr("src"));
}
});
}
};