[nodebb-plugin-dbsearch] DB Search Plugin
-
@baris Hey buddy, I'm unable to re-index my data, there's a lot of it, and it basically brings the server to a standstill, nodebb crashes and nothing appears indexed after a restart. 500 error teaser doesn't exist.
Stats:
28,000 posts
2000 topics from 490 users.While it's indexing I get a 504 Gateway Time-out. Is there a way to break up the indexing?
Just had a thought, it says new content is indexed automatically, if I re-index before I import my data, would that work?
-
Can you update the plugin and nodebb core and give it another try? I reindex 1.6k
topics and 12.5k posts in 30 seconds. I added some logging and timing into reindex so you should see the progress now. Also changed the reindex to use eachLimit so it doesn't try to reindex everything at once.Let me know if it changes anything.
-
@baris What versions have compatibility with 0.5.x?
-
Tried this out (is it the only search plugin?!) for v0.6.x and searches have an issue with broken templates I think?
You get no search results, and a broken page (as above)
As well as a console error in JS of "Uncaught TypeError: Cannot read property 'split' of undefined" but that's probably more a symptom of the template render issue. -
@Drew-Llewellyn said:
Tried this out (is it the only search plugin?!) for v0.6.x and searches have an issue with broken templates I think?
You get no search results, and a broken page (as above)
As well as a console error in JS of "Uncaught TypeError: Cannot read property 'split' of undefined" but that's probably more a symptom of the template render issue.This is my compiled search.tpl file, and I can't seem to find what the problem is:
<ol class="breadcrumb"> <!-- BEGIN breadcrumbs --> <li itemscope="itemscope" itemtype="http://data-vocabulary.org/Breadcrumb" <!-- IF @last -->class="active"<!-- ENDIF @last -->> <!-- IF !@last --><a href="{breadcrumbs.url}" itemprop="url"><!-- ENDIF !@last --> <span itemprop="title"> {breadcrumbs.text} <!-- IF @last --> <!-- IF !feeds:disableRSS --> <!-- IF rssFeedUrl --><a target="_blank" href="{rssFeedUrl}"><i class="fa fa-rss-square"></i></a><!-- ENDIF rssFeedUrl --><!-- ENDIF !feeds:disableRSS --> <!-- ENDIF @last --> </span> <!-- IF !@last --></a><!-- ENDIF !@last --> </li> <!-- END breadcrumbs --> </ol> <div class="search"> <div class="row"> <div class="well col-md-12"> <form id="advanced-search"> <div class="form-group"> <label>[[global:search]]</label> <input type="text" class="form-control" id="search-input" placeholder="[[global:search]]"> </div> <div class="form-group"> <label>[[search:in]]</label> <select class="form-control"> <option value="posts">[[global:posts]]</option> <option value="users">[[global:users]]</option> <option value="tags">[[tags:tags]]</option> </select> </div> <div class="form-group by-container<!-- IF hidePostedBy --> hide<!-- ENDIF hidePostedBy -->"> <label>[[search:by]]</label> <input type="text" class="form-control" id="posted-by-input" placeholder="[[search:posted-by]]"> </div> <button type="submit" class="btn btn-default">[[global:search]]</button> </form> </div> <div id="results" class="col-md-12" data-search-query="{search_query}"> <!-- IF matchCount --> <div class="alert alert-info">[[search:results_matching, {matchCount}, {search_query}, {time}]] </div> <!-- ELSE --> <div class="alert alert-warning">[[search:no-matches]]</div> <!-- ENDIF matchCount --> <!-- BEGIN posts --> <div class="topic-row panel panel-default clearfix"> <div class="panel-body"> <a href="{relative_path}/topic/{posts.topic.slug}/{posts.index}" class="search-result-text"> <h4>{posts.topic.title}</h4> </a> <div class="search-result-text"> {posts.content} <p class="fade-out"></p> </div> <small> <span class="pull-right footer"> <a href="{relative_path}/users/{posts.user.userslug}"><img class="user-img" title="{posts.user.username}" src="{posts.user.picture}"/></a> [[global:posted_in_ago, <a href="{relative_path}/category/{posts.category.slug}"><i class="fa {posts.category.icon}"></i> {posts.category.name}</a>, <span class="timeago" title="{posts.relativeTime}"></span>]] </span> </small> </div> </div> <!-- END posts --> <!-- IF users.length --> <ul id="users-container" class="users-container"> <!-- BEGIN users --> <li class="users-box registered-user" data-uid="{users.uid}"> <a href="{relative_path}/user/{users.userslug}"><img src="{users.picture}" class="img-thumbnail"/></a> <br/> <div class="user-info"> <span> <i class="fa fa-circle status {users.status}" title="[[global:{users.status}]]"></i> <a href="{relative_path}/user/{users.userslug}">{users.username}</a> </span> <br/> <div title="reputation" class="reputation"> <i class='fa fa-star'></i> <span class='formatted-number'>{users.reputation}</span> </div> <div title="post count" class="post-count"> <i class='fa fa-pencil'></i> <span class='formatted-number'>{users.postcount}</span> </div> </div> </li> <!-- END users --> </ul> <!-- ENDIF users.length --> <!-- IF tags.length --> <!-- BEGIN tags --> <h3 class="pull-left tag-container"> <a href="{relative_path}/tags/{tags.value}" data-value="{tags.value}"><span class="tag-item" data-tag="{tags.value}" style="<!-- IF tags.color -->color: {tags.color};<!-- ENDIF tags.color --><!-- IF tags.bgColor -->background-color: {tags.bgColor};<!-- ENDIF tags.bgColor -->">{tags.value}</span><span class="tag-topic-count">{tags.score}</span></a> </h3> <!-- END tags --> <!-- ENDIF tags.length --> </div> </div> </div>
-
installed the plugin today, but it think it mistakenly installed the older version and I guess it's not working, says 'No matches found'.
-
I have several comments/requests:
If any of these are doable? I would like to carry them to GitHub...
1. In Turkish, we have some letters with accents such as ı,ç,ö,ş,ü,ğ... however since our English keyboard does not contain these letters, it is commonly used with english letters, and for a normal Turkish person the word "cesme" would be easily understood as "çeşme" in a sentence; however dbsearch is making difference with these two words, and therefore we -most of the time- cannot find what we are searching for on the form.
So, I wonder if it would be possible for this letter to be recognized as their counterpart without accent? Such as
ı can be also i
ç can be also c
ö can be also o
ş can be also s
ü can be also u
ğ can be also gIt would help us a lot.
2. When you search a word on the forum it is quite important to write the word correct, however sometimes people make mistakes in their comments/posts/titles and it is not edited later. So for example, when you search for "importan" or "importat" it is never showing you the word "important" or vice versa. I believe a wobbly search would be quite nice, so maybe a long word with one letter mistake is tolerated; so people can find what they are looking for.
3. Would it be possible to implement a hashtag system to the forum? Unlike most forums, our forum is based on accumulating experiences and knowledge under related title, so creating new topic for something already in the forum is discouraged. This of course causes very long topics, however since tag system only works for the first post and we cannot tag other keywords in the following posts, it is getting harder to find other related stuff (especially #1 issue causes problems with our dbsearch). It would be cool to have a hashtag in or below the post so for example, if people are giving information about "high school" in a "New York" topic, they can tag their post with #highschool and later this can be found very easily with dbsearch or just by clicking the hashtag. I think people also like using hashtags because of social media.