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 9288131
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T19:50:51+00:00 2026-06-18T19:50:51+00:00

Why are the two last rewrite rules in the example from Oracle documentation not

  • 0

Why are the two last rewrite rules in the example from Oracle documentation not working?

Source http://docs.oracle.com/cd/B28359_01/text.111/b28303/query.htm#i1007557

Query applications sometimes parse end user queries, interpreting a
query string in one or more ways using different operator
combinations. For example, if a user enters a query of kukui nut, your
application might enter the queries {kukui nut} and {kukui or nut} to
increase recall.

The query rewrite feature enables you to submit a single query that
expands the original query into the rewritten versions. The results
are returned with no duplication.

You specify your rewrite sequences with the query template feature.
The rewritten versions of the query are executed efficiently with a
single call to CONTAINS or CATSEARCH.

The following template defines a query rewrite sequence. The query of
{kukui nut} is rewritten as follows:

{kukui} {nut}

{kukui} ; {nut}

{kukui} AND {nut}

{kukui} ACCUM {nut}

The query rewrite template for these transformations is as follows:

select id from docs where CONTAINS (text,
 '<query>
   <textquery lang="ENGLISH" grammar="CONTEXT"> kukui nut
     <progression>
       <seq><rewrite>transform((TOKENS, "{", "}", " "))</rewrite></seq>
       <seq><rewrite>transform((TOKENS, "{", "}", " ; "))</rewrite></seq>
       <seq><rewrite>transform((TOKENS, "{", "}", "AND"))</rewrite></seq>
       <seq><rewrite>transform((TOKENS, "{", "}", "ACCUM"))</rewrite></seq>
     </progression>
   </textquery>
  <score datatype="INTEGER" algorithm="COUNT"/>
</query>')>0;
  • 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-18T19:50:52+00:00Added an answer on June 18, 2026 at 7:50 pm

    There’s an error in the example provided by Oracle. It is essential that the query operators are separated with spaces:

    <seq><rewrite>transform((TOKENS, "{", "}", " AND "))</rewrite></seq>
    <seq><rewrite>transform((TOKENS, "{", "}", " ACCUM "))</rewrite></seq>
    

    so ” AND ” and ” ACCUM ” instead of “AND” and “ACCUM” as in the documentation.

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

Sidebar

Related Questions

How do I remove the last two chars from each line in a text
There is an example on php.net how to get last two domain segments in
In short: I want to generate two different source trees from the current one,
I'm trying to rewrite URLs as follows: www.example.com/module-name(/) => handler.php?module=module-name www.example.com/module-name/list/of/arguments(/) => handler.php?module=module-name&args=list/of/arguments (which
i need some help to write two URL rewrite rules in IIS7, i have
I cannot rewrite to include two parameters but the last parameter is optional, so
I am working with flex for the last two years on some desktop apps.
I've got 3 table cells and somehow it displays the two last contents in
In the last two days, ive run across code that has php echo'd variables
What is the problem with the last two statements in the code? #include <iostream>

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.