Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nQAFs-0003lx-MJ for pgsql-general@arkaria.postgresql.org; Fri, 04 Mar 2022 15:54:08 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nQAFq-0004X9-Os for pgsql-general@arkaria.postgresql.org; Fri, 04 Mar 2022 15:54:06 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nQAFq-0004X0-EN for pgsql-general@lists.postgresql.org; Fri, 04 Mar 2022 15:54:06 +0000 Received: from momjian.us ([72.94.173.45]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nQAFo-0001o4-29 for pgsql-general@lists.postgresql.org; Fri, 04 Mar 2022 15:54:06 +0000 Received: from bruce by momjian.us with local (Exim 4.94.2) (envelope-from ) id 1nQAFl-008pYn-53; Fri, 04 Mar 2022 10:54:01 -0500 Date: Fri, 4 Mar 2022 10:54:01 -0500 From: Bruce Momjian To: "Bayer, Samuel" Cc: Atri Sharma , pgsql-general@lists.postgresql.org Subject: Re: [EXT] Re: Looking for tips on improving full-text search quality in Postgres Message-ID: References: <7ce98668-3fdb-254a-fa81-f1c4d09e6607@mitre.org> <23582_1646407541_62222F75_23582_337_5_YiIvdEhT5BecGxPY@momjian.us> <4b5afb83-3e90-17c7-2650-9bd521e958a7@mitre.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4b5afb83-3e90-17c7-2650-9bd521e958a7@mitre.org> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Fri, Mar 4, 2022 at 10:41:16AM -0500, Bayer, Samuel wrote: > Example anecdote: the documents I'm searching come with metadata > (e.g., title), which I'm not indexing specially (not a separate field, > just part of the raw text of the document). When I search even for > single terms, and look at the titles of the results, the titles in the > Solr results more frequently contain that term than the titles in the > Postgres results. I also FEEL like I've noticed that the problem is > more apparent in "OR" queries; if I search for a disjunction of terms, > the documents that contain all the terms are more likely to be high in > the Solr rankings than in the Postgres rankings. > > I apologize for not being able to be more specific. I know it is hard to quantify. Is it possible that Postgres is treating all the terms equally, while Solr is prioritizing terms that are earlier in the document? -- Bruce Momjian https://momjian.us EDB https://enterprisedb.com If only the physical world exists, free will is an illusion.