EPrints Technical Mailing List Archive

See the EPrints wiki for instructions on how to join this mailing list and related information.

Message: #08637


< Previous (by date) | Next (by date) > | < Previous (in thread) | Next (in thread) > | Messages - Most Recent First | Threads - Most Recent First

Re: [EP-tech] Ask about searching


CAUTION: This e-mail originated outside the University of Southampton.
Hi Adam

earlier, when I typed in the keyword the search results didn't appear. it turns out that I have to generate_abstract and generate_views so that the indexing process runs.

Now, the search process can display search results correctly.

Thanks Adam for the help.

Best regards,
Agung Prasetyo Wibowo

On Thu, Jun 3, 2021 at 9:42 AM Ajunk Pracetio via Eprints-tech <eprints-tech@ecs.soton.ac.uk> wrote:
CAUTION: This e-mail originated outside the University of Southampton.
Hi Adam,

I've tried the script you provided, but what about the id of each search box? How to make it display its search results? I also don't understand about preamble phrases.

Please help.

Regards
Agung Prasetyo

On Wed, Jun 2, 2021 at 3:10 PM David R Newman <drn@ecs.soton.ac.uk> wrote:

Hi Agung,

What you might want is a bespoke simple search that only specifies those four fields to be searched upon but this would only give one box rather than four.  So you would then need to put something in the search page's preamble phrase to explain what can be searched upon.  However, from your mockup it looks like this maybe a search you want embedded in your template.  You can hack what would be an advanced search to create this.  Here is a quick go I have had:

<form method="get" accept-charset="utf-8" action="">   <input name="screen" id="screen" value="Search" type="hidden"/>
  <input name="dataset" id="dataset" value="archive" type="hidden"/>
  <div class="ep_table">
    <div class="ep_table_row">
      <input name="title_merge" type="hidden" id="title_merge" value="ALL"/>
      <div class="ep_multi_heading ep_table_cell"><span id="title_label"><span id="title_label">Title</span></span></div>
      <div class="ep_table_cell"><input name="title" maxlength="256" aria-labelledby="title_label" type="text" class="ep_form_text" size="15"/></div>
    </div>
    <div class="ep_table_row">
      <input name="creators_name_merge" type="hidden" id="creators_name_merge" value="ALL"/>
      <div class="ep_multi_heading ep_table_cell"><span id="creators_name_label"><span id="creators_name_label">Author Name</span></span></div>
      <div class="ep_table_cell"><input name="creators_name" maxlength="256" aria-labelledby="creators_name_label" type="text" class="ep_form_text" size="15"/></div>
    </div>
    <div class="ep_table_row">
      <input name="keywords_merge" type="hidden" id="keywords_merge" value="ALL"/>
      <div class="ep_multi_heading ep_table_cell"><span id="keywords_label"><span id="keywords_label">Keyword</span></span></div>
      <div class="ep_table_cell"><input name="keywords" maxlength="256" aria-labelledby="keywords_label" type="text" class="ep_form_text" size="15"/></div>
    </div>
    <div class="ep_table_row">
      <div class="ep_multi_heading ep_table_cell"><span id="keywords_label"><span id="keywords_label">Year</span></span></div>
      <div class="ep_table_cell"><input name="keywords" maxlength="256" aria-labelledby="keywords_label" type="text" class="ep_form_text" size="6"/></div>
    </div>
    <div class="ep_table_row">
      <input name="satisfyall" type="hidden" id="satisfyall" value="ALL"/>
      <input value="Search" name="_action_search" type="submit" class="ep_form_action_button" role="button"/>
    </div>
  </div>
</form>

You will certainly need to do a bit of work to get it into a format like the mockup you included by altering the CSS but the search form itself should be sound and perform a search that requires all values entered to match the fields they have been entered against.   As this is your own bespoke form you can modify it to add your own class and id attributes where needed to make it easier to modify your CSS to make the form appear like your mockup.

Regards

David Newman

On 02/06/2021 01:37, Ajunk Pracetio via Eprints-tech wrote:
CAUTION: This e-mail originated outside the University of Southampton.
Hi,

I'd like to ask about searching in EPrints. Is it possible to make a search form like advanced search but without options "All of" and "Any of"?

The search form design is like this below
image.png

Maybe someone can help me with this problem?

Thank you.

Best regards,
Agung Prasetyo W.

*** Options: http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
*** Archive: http://www.eprints.org/tech.php/
*** EPrints community wiki: http://wiki.eprints.org/

Virus-free. www.avg.com
*** Options: http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
*** Archive: http://www.eprints.org/tech.php/
*** EPrints community wiki: http://wiki.eprints.org/