Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How to restrict search to only some space and the search input to not be empty

Alberto_Guerra October 2, 2019

This is my code of my search.

Problem are 2:

1)it will search in all my spaces, which is a problem because i have 2 space in a language and another 2 space in another language. I want for the search to only search in the defined space i give him.

2) if i press the search button it will search for an empty string which result in a result page of all and every single page.

Help please!

<div class="search">
      <h1 class="blue">Search</h1>
     <p class="lead">Search for "<em>$searchRequest.queryString</em>" has found                  $searchResults.total result.</p>

<ol>
          #foreach($result in $searchResults.results)
          <li>
          <h4><a href="$result.absoluteLink">$result.displayTitle</a></h4>
          <p>$result.description</p>
          </li>
          #end
</ol>

</div>

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events