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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T10:19:20+00:00 2026-06-04T10:19:20+00:00

I am trying to write a lucene search in an Alfresco webscript (javascript) to

  • 0

I am trying to write a lucene search in an Alfresco webscript (javascript) to find 1 of 2 custom types within a custom type cm:folder

So the folder might have the following contents
1. Some text (cm:content)
2. More text (custom:content)
3. Even more text (custom:content)
4. Another folder (cm:folder)
5. Crazy, more text (custom:content2)
6. Last text (custom:content2)

The expected result of the lucene search should return the following
2. More text (custom:content)
3. Even more text (custom:content)
5. Crazy, more text (custom:content2)
6. Last text (custom:content2)

Where am I going wrong with the lucene search? I have written something along the lines of

+PATH:"/app:company_home/PATH_TO_A_CUSTOM_TYPE_FOLDER/*" TYPE:"custom:content1"  TYPE:"custom:content2"

The problem is it returns all content, I think the intention is to write something like

+PATH:"/app:company_home/PATH_TO_A_CUSTOM_TYPE_FOLDER/*" +TYPE:"custom:content1" OR +PATH:"/app:company_home/PATH_TO_A_CUSTOM_TYPE_FOLDER/*"+TYPE:"custom:content2"

Worse case scenario is I can run 2 lucene searches, but it would be good to know how the query is written 🙂

Thanks

  • 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-04T10:19:22+00:00Added an answer on June 4, 2026 at 10:19 am

    Can’t you just do the following:

    +PATH:"/app:company_home/PATH_TO_A_CUSTOM_TYPE_FOLDER/*" AND (TYPE:"custom:content1" TYPE:"custom:content2")
    

    Because if you write +PATH TYPE: TYPE:, it actually says PATH:(Must have) OR TYPE: OR TYPE:, hence it looks that if the PATH: is matched it will return everything beneath.

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

Sidebar

Related Questions

I'm trying write a query to find records which don't have a matching record
Trying to write a javascript bookmarklet to jump from a front end link into
Im trying to write something to get my images to show correctly. I have
I'm trying to make a searchable phone/local business directory using Apache Lucene. I have
I'm trying to write and use a custom filter for Solr. The parent application
Trying to write better JavaScript, woohoo! First step for me: YUILoader dependency loader so
In trying to write more testable Java code, I have been using the Model-View-Presenter
Im trying to write a single activity app, extending ListActivity. I have a class
I am seeing the following error when trying to search using Lucene. (version 1.4.3).
I am trying to build a query to search an Lucene index of names

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.