user/dev discussion of public-inbox itself
 help / color / mirror / code / Atom feed
Search results ordered by [date|relevance]  view[summary|nested|Atom feed]
thread overview below | download mbox.gz: |
* [PATCH 5/6] searchidx: index_text: use Xapian parameter names
  2020-01-03  8:45  6% [PATCH 0/6] searchidx: minor fix and some cleanups Eric Wong
@ 2020-01-03  8:46  7% ` Eric Wong
  0 siblings, 0 replies; 2+ results
From: Eric Wong @ 2020-01-03  8:46 UTC (permalink / raw)
  To: meta

Use the parameter names from the Search::Xapian::TermGenerator
manpage for our local variables instead of confusing names...
---
 lib/PublicInbox/SearchIdx.pm | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/lib/PublicInbox/SearchIdx.pm b/lib/PublicInbox/SearchIdx.pm
index 47537ed4..ca1457fd 100644
--- a/lib/PublicInbox/SearchIdx.pm
+++ b/lib/PublicInbox/SearchIdx.pm
@@ -144,14 +144,14 @@ sub term_generator ($) { # write-only
 }
 
 sub index_text ($$$$) {
-	my ($self, $field, $n, $text) = @_;
-	my $tg = term_generator($self);
+	my ($self, $text, $wdf_inc, $prefix) = @_;
+	my $tg = term_generator($self); # man Search::Xapian::TermGenerator
 
 	if ($self->{indexlevel} eq 'full') {
-		$tg->index_text($field, $n, $text);
+		$tg->index_text($text, $wdf_inc, $prefix);
 		$tg->increase_termpos;
 	} else {
-		$tg->index_text_without_positions($field, $n, $text);
+		$tg->index_text_without_positions($text, $wdf_inc, $prefix);
 	}
 }
 

^ permalink raw reply related	[relevance 7%]

* [PATCH 0/6] searchidx: minor fix and some cleanups
@ 2020-01-03  8:45  6% Eric Wong
  2020-01-03  8:46  7% ` [PATCH 5/6] searchidx: index_text: use Xapian parameter names Eric Wong
  0 siblings, 1 reply; 2+ results
From: Eric Wong @ 2020-01-03  8:45 UTC (permalink / raw)
  To: meta

1/6 is a real bug fix, 4/6 is a nice simplification
and the rest makes reading easier when I haven't looked
at the indexing code in a while.

Xapian indexing is still expensive, though...

Eric Wong (6):
  searchidx: index_diff: allow /^$/ line as diff context
  searchidx: split off index_xapian for msg_iter
  searchidx: add_message: fix and make use of prototypes
  searchidx: simplify quote-splitting in index_body
  searchidx: index_text: use Xapian parameter names
  searchidx: remove_message: pedantic fix for v1

 lib/PublicInbox/SearchIdx.pm | 177 ++++++++++++++++-------------------
 1 file changed, 83 insertions(+), 94 deletions(-)


^ permalink raw reply	[relevance 6%]

Results 1-2 of 2 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2020-01-03  8:45  6% [PATCH 0/6] searchidx: minor fix and some cleanups Eric Wong
2020-01-03  8:46  7% ` [PATCH 5/6] searchidx: index_text: use Xapian parameter names Eric Wong

Code repositories for project(s) associated with this public inbox

	https://80x24.org/public-inbox.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).