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 1/2] search: support Subject:-less messages
  2016-06-21 10:35  5% [PATCH 0/2] Subject-less message support Eric Wong
@ 2016-06-21 10:35  7% ` Eric Wong
  0 siblings, 0 replies; 2+ results
From: Eric Wong @ 2016-06-21 10:35 UTC (permalink / raw)
  To: meta

Some mailing lists allow empty Subject headers and we shall support
searching and indexing them.
---
 lib/PublicInbox/Search.pm | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/lib/PublicInbox/Search.pm b/lib/PublicInbox/Search.pm
index bf50365..3a908ac 100644
--- a/lib/PublicInbox/Search.pm
+++ b/lib/PublicInbox/Search.pm
@@ -107,12 +107,15 @@ sub get_thread {
 
 	return { total => 0, msgs => [] } unless $smsg;
 	my $qtid = Search::Xapian::Query->new(xpfx('thread').$smsg->thread_id);
-	my $path = id_compress($smsg->path);
-	my $qsub = Search::Xapian::Query->new(xpfx('path').$path);
-	my $query = Search::Xapian::Query->new(OP_OR, $qtid, $qsub);
+	my $path = $smsg->path;
+	if (defined $path && $path ne '') {
+		my $path = id_compress($smsg->path);
+		my $qsub = Search::Xapian::Query->new(xpfx('path').$path);
+		$qtid = Search::Xapian::Query->new(OP_OR, $qtid, $qsub);
+	}
 	$opts ||= {};
 	$opts->{limit} ||= 1000;
-	_do_enquire($self, $query, $opts);
+	_do_enquire($self, $qtid, $opts);
 }
 
 sub _do_enquire {

^ permalink raw reply related	[relevance 7%]

* [PATCH 0/2] Subject-less message support
@ 2016-06-21 10:35  5% Eric Wong
  2016-06-21 10:35  7% ` [PATCH 1/2] search: support Subject:-less messages Eric Wong
  0 siblings, 1 reply; 2+ results
From: Eric Wong @ 2016-06-21 10:35 UTC (permalink / raw)
  To: meta

Eric Wong (2):
      search: support Subject:-less messages
      view: support non-existent Subjects for permalink titles

 lib/PublicInbox/Search.pm | 11 +++++++----
 lib/PublicInbox/View.pm   |  1 +
 2 files changed, 8 insertions(+), 4 deletions(-)

^ permalink raw reply	[relevance 5%]

Results 1-2 of 2 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2016-06-21 10:35  5% [PATCH 0/2] Subject-less message support Eric Wong
2016-06-21 10:35  7% ` [PATCH 1/2] search: support Subject:-less messages 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).