Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8311667
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T19:53:37+00:00 2026-06-08T19:53:37+00:00

Sqlite3’s full text search facility – FTS3 – allows to use MATCH operator for

  • 0

Sqlite3’s full text search facility – FTS3 – allows to use MATCH operator for fast full-text search:

SELECT ItemId FROM docs WHERE docs.text MATCH 'linux'

However, it does not support OR operator anywhere in an SQL query where there’s a MATCH (source: 1, 2):

SELECT ItemId FROM docs WHERE docs.text MATCH 'linux' OR column=value
error: unable to use function MATCH in the requested context

(Not to be confused with OR operator in the FTS3 query itself, i.e. SELECT ItemId FROM docs WHERE docs.text MATCH 'linux OR unix'. This works fine.)

Is there a way to rewrite the query so that it works (even if it’s somewhat slower)?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T19:53:38+00:00Added an answer on June 8, 2026 at 7:53 pm

    Rewriting the query using temporary views will work as expected:

    CREATE TEMP VIEW view1 AS SELECT ItemId FROM docs WHERE docs.text MATCH 'linux' 
    SELECT * FROM docs WHERE ItemId IN view1 OR column=value
    DROP VIEW view1
    

    The speed will be comparable to that of a “direct” query (without the temporary view) if the temporary view is not “sweeping”, i.e. it does not generate a lot of rows.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

SQLite3 appears to come with three different full-text search engines, called FTS1, FTS2, and
I have a sqlite3 full text search table defined like this: CREATE VIRTUAL TABLE
if i use sqlite3.exe the text is returned from my tables correctly however within
Using sqlite3, if my query is SELECT * FROM table WHERE title LIKE '%x%'
I want to use sqlite3 but pg for production on heroku. However, I don't
I compiled the sqlite3 amalgamation into Android NDK, and I'm able to use it
I'm using sqlite3 and would like to know, if there is a fast way
I use gem 'sqlite3', '1.3.5' on dev and gem 'pg', '0.12.2' on prod. ruby
I use sqlite3 with c language recently. Can anyone tell me some convenient ORM
sqlite3 pcheck.db SELECT * FROM printers gives me: 1|10.0.0.x|HP4250INK|public|hp LaserJet 4250|CNHXXXXXX|14457|Sleep Mode i want

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.