Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Alfresco CMIS

You're reading from   Alfresco CMIS Learn how to build applications that talk to content management servers in a standardized way using this superb course on getting the best from Alfresco CMIS. This is a highly practical, step-by-step guide.

Arrow left icon
Product type Paperback
Published in Mar 2014
Publisher
ISBN-13 9781782163527
Length 272 pages
Edition Edition
Languages
Concepts
Arrow right icon
Author (1):
Arrow left icon
Martin Bergljung Martin Bergljung
Author Profile Icon Martin Bergljung
Martin Bergljung
Arrow right icon
View More author details
Toc

Table of Contents (14) Chapters Close

Alfresco CMIS
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
1. Getting Started with CMIS FREE CHAPTER 2. Basic CMIS Operations 3. Advanced CMIS Operations 4. Alfresco and CMIS 5. Accessing a CMIS Server with a Java Client 6. Accessing a CMIS Server Using Scripting Languages 7. System Integration with CMIS Index

Searching


To be able to search for content is one of the main requirements you would have on a CMS system library such as OpenCMIS. And, it supports both searching in metadata and a full-text search in content. Before doing any searches, we first need to see which search features are supported by the repository. We want it to support both a metadata search and FTS:

public void searchMetadataAndFTS(Session session) {
  // Check if the repo supports Metadata search and 
  // Full Text Search (FTS)
  RepositoryInfo repoInfo = session.getRepositoryInfo();
  if (repoInfo.getCapabilities().getQueryCapability().equals(
  CapabilityQuery.METADATAONLY)) {
    logger.warn("Repository does not support FTS [repoName=" + 
    repoInfo.getProductName() + "][repoVersion=" + 
    repoInfo.getProductVersion() + "]");
  } else {
    String query = "SELECT * FROM cmis:document WHERE "+
    "cmis:name LIKE 'OpenCMIS%'";
    ItemIterable<QueryResult> searchResult = 
    session.query(query, false);
   ...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime