Difference between revisions of "API:EPrints/Index"

From EPrints Documentation
Jump to: navigation, search
(New page: <!-- Pod2Wiki=_preamble_ This page has been automatically generated from the EPrints source. Any wiki changes made between the 'Pod2Wiki=*' and 'End of Pod2Wiki' comments will be lost. -...)
 
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
<!-- Pod2Wiki=_preamble_  
 
<!-- Pod2Wiki=_preamble_  
This page has been automatically generated from the EPrints source. Any wiki changes made between the 'Pod2Wiki=*' and 'End of Pod2Wiki' comments will be lost.
+
This page has been automatically generated from the EPrints 3.4 source. Any wiki changes made between the 'Pod2Wiki=*' and 'Edit below this comment' comments will be lost.
  -->{{Pod2Wiki}}{{API:Source|file=EPrints/Index.pm|package_name=EPrints::Index}}[[Category:API|Index]]<!-- End of Pod2Wiki -->
+
  -->{{API}}{{Pod2Wiki}}{{API:Source|file=EPrints/Index.pm|package_name=EPrints::Index}}[[Category:API|INDEX]]<div><!-- Edit below this comment -->
<!-- Pod2Wiki=head_name -->=NAME=
+
 
 +
 
 +
<!-- Pod2Wiki=_private_ --><!-- Pod2Wiki=head_name -->
 +
==NAME==
 
'''EPrints::Index''' - Methods for indexing objects for later searching.
 
'''EPrints::Index''' - Methods for indexing objects for later searching.
  
<!-- End of Pod2Wiki -->
+
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
<!-- Pod2Wiki=head_description -->=DESCRIPTION=
+
<span style='display:none'>User Comments</span>
 +
<!-- Edit below this comment -->
 +
 
 +
 
 +
<!-- Pod2Wiki= -->
 +
</div>
 +
<!-- Pod2Wiki=head_description -->
 +
==DESCRIPTION==
 
This module contains methods used to add and remove information from the free-text search indexes.  
 
This module contains methods used to add and remove information from the free-text search indexes.  
  
<!-- End of Pod2Wiki -->
+
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
<!-- Pod2Wiki=head_functions -->=FUNCTIONS=
+
<span style='display:none'>User Comments</span>
<!-- End of Pod2Wiki -->
+
<!-- Edit below this comment -->
<!-- Pod2Wiki=item_remove -->==remove==
+
 
 +
 
 +
<!-- Pod2Wiki= -->
 +
</div>
 +
<!-- Pod2Wiki=head_methods -->
 +
==METHODS==
 +
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
 +
<span style='display:none'>User Comments</span>
 +
<!-- Edit below this comment -->
 +
 
 +
 
 +
<!-- Pod2Wiki= -->
 +
</div>
 +
<!-- Pod2Wiki=item_remove -->
 +
===remove===
 +
 
 +
$ok = EPrints::Index::remove( $session, $dataset, $objectid, $fieldids )
 +
Remove all indexes to the fields {{API:PodLink|file=$fieldids|package_name=$fieldids|section=|text=$fieldids}} within the specified  <tt>objectid</tt> that is from the <tt>$dataset</tt>.
 +
 
 +
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
 +
<span style='display:none'>User Comments</span>
 +
<!-- Edit below this comment -->
 +
 
 +
 
 +
<!-- Pod2Wiki= -->
 +
</div>
 +
<!-- Pod2Wiki=item_remove_all -->
 +
===remove_all===
 +
 
 +
$ok = EPrints::Index::remove_all( $session, $dataset, $objectid )
 +
Remove all indexes to the specified <tt>$objectid</tt> part of the  <tt>$dataset</tt>.
 +
 
 +
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
 +
<span style='display:none'>User Comments</span>
 +
<!-- Edit below this comment -->
 +
 
 +
 
 +
<!-- Pod2Wiki= -->
 +
</div>
 +
<!-- Pod2Wiki=item_purge_index -->
 +
===purge_index===
 +
 
 +
EPrints::Index::purge_index( $session, $dataset )
 +
Remove all the current index information for the given <tt>$dataset</tt>.  Only really useful if used in conjunction with rebuilding the indexes.
 +
 
 +
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
 +
<span style='display:none'>User Comments</span>
 +
<!-- Edit below this comment -->
 +
 
  
  EPrints::Index::remove( $session, $dataset, $objectid, $fieldid )
+
<!-- Pod2Wiki= -->
 +
</div>
 +
<!-- Pod2Wiki=item_add -->
 +
===add===
  
Remove all indexes to the field in the specified object.
+
$ok = EPrints::Index::add( $session, $dataset, $objectid, $fieldid, $value )
 +
Add indexes to the <tt>fieldid</tt> in the specified <tt>$objectid</tt>. The index  keys will be taken from <tt>$value</tt>.
  
<!-- End of Pod2Wiki -->
+
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
<!-- Pod2Wiki=item_purge_index -->==purge_index==
+
<span style='display:none'>User Comments</span>
 +
<!-- Edit below this comment -->
  
  EPrints::Index::purge_index( $session, $dataset )
 
  
Remove all the current index information for the given dataset. Only really useful if used in conjunction with rebuilding the indexes.
+
<!-- Pod2Wiki= -->
 +
</div>
 +
<!-- Pod2Wiki=item_update_ordervalues -->
 +
===update_ordervalues===
  
<!-- End of Pod2Wiki -->
+
EPrints::Index::update_ordervalues( $session, $dataset, $data, $changed )
<!-- Pod2Wiki=item_add -->==add==
+
Update the order values for an object. <tt>$data</tt> is a structure returned by:
  
  EPrints::Index::add( $session, $dataset, $objectid, $fieldid, $value )
+
$dataobj-&gt;get_data
 +
 +
<tt>$changed</tt> is a hash of changed fields.
  
Add indexes to the field in the specified object. The index keys will be taken from value.
+
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
 +
<span style='display:none'>User Comments</span>
 +
<!-- Edit below this comment -->
  
<!-- End of Pod2Wiki -->
 
<!-- Pod2Wiki=item_update_ordervalues -->==update_ordervalues==
 
  
  EPrints::Index::update_ordervalues( $session, $dataset, $data )
+
<!-- Pod2Wiki= -->
 +
</div>
 +
<!-- Pod2Wiki=item_insert_ordervalues -->
 +
===insert_ordervalues===
  
Update the order values for an object. $data is a structure returned by $dataobj-&gt;get_data
+
EPrints::Index::insert_ordervalues( $session, $dataset, $data )
 +
Create the order values for an object. <tt>$data</tt> is a structure returned by:
  
<!-- End of Pod2Wiki -->
+
$dataobj-&gt;get_data
<!-- Pod2Wiki=item_insert_ordervalues -->==insert_ordervalues==
+
 
 +
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
 +
<span style='display:none'>User Comments</span>
 +
<!-- Edit below this comment -->
  
  EPrints::Index::insert_ordervalues( $session, $dataset, $data )
 
  
Create the order values for an object. $data is a structure returned by $dataobj-&gt;get_data
+
<!-- Pod2Wiki= -->
 +
</div>
 +
<!-- Pod2Wiki=item_delete_ordervalues -->
 +
===delete_ordervalues===
  
<!-- End of Pod2Wiki -->
+
EPrints::Index::delete_ordervalues( $session, $dataset, $id )
<!-- Pod2Wiki=item_delete_ordervalues -->==delete_ordervalues==
+
Remove the ordervalues for item <tt>$id</tt> from the ordervalues table of <tt>$dataset</tt>.
  
  EPrints::Index::delete_ordervalues( $session, $dataset, $id )
+
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
 +
<span style='display:none'>User Comments</span>
 +
<!-- Edit below this comment -->
  
Remove the ordervalues for item $id from the ordervalues table of $dataset.
 
  
<!-- End of Pod2Wiki -->
+
<!-- Pod2Wiki= -->
<!-- Pod2Wiki=item_split_words -->==split_words==
+
</div>
 +
<!-- Pod2Wiki=item_$pidfilepath -->
 +
===$pidfilepath===
  
  @words = EPrints::Index::split_words( $session, $utext )
+
$pidfilepath = EPrints::Index::pidfile
 +
Return the filepath for the indexer PID file.
  
Splits a utf8 string into individual words.  
+
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
 +
<span style='display:none'>User Comments</span>
 +
<!-- Edit below this comment -->
  
<!-- End of Pod2Wiki -->
 
<!-- Pod2Wiki=item_apply_mapping -->==apply_mapping==
 
  
  $utext2 = EPrints::Index::apply_mapping( $session, $utext )
+
<!-- Pod2Wiki= -->
 +
</div>
 +
<!-- Pod2Wiki=item_$tickfilepath -->
 +
===$tickfilepath===
  
Replaces certain unicode characters with ASCII equivalents and returns the new string.
+
$tickfilepath = EPrints::Index::tickfile
 +
Return the filepath for the indexer tick file.
  
This is used before indexing words so that things like umlauts will be ignored when searching.
+
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
 +
<span style='display:none'>User Comments</span>
 +
<!-- Edit below this comment -->
  
<!-- End of Pod2Wiki -->
 
<!-- Pod2Wiki=head_undocumented_methods -->=UNDOCUMENTED METHODS=
 
{{API:Undocumented Methods}}<!-- End of Pod2Wiki -->
 
<!-- Pod2Wiki=item_binfile -->==binfile==
 
  
<!-- End of Pod2Wiki -->
+
<!-- Pod2Wiki= -->
<!-- Pod2Wiki=item_cleanup_indexer -->==cleanup_indexer==
+
</div>
 +
<!-- Pod2Wiki=item_$logfilepath -->
 +
===$logfilepath===
  
<!-- End of Pod2Wiki -->
+
$logfilepath = EPrints::Index::logfile
<!-- Pod2Wiki=item_do_index -->==do_index==
+
Return the filepath for the indexer log file.
  
<!-- End of Pod2Wiki -->
+
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
<!-- Pod2Wiki=item_do_tick -->==do_tick==
+
<span style='display:none'>User Comments</span>
 +
<!-- Edit below this comment -->
  
<!-- End of Pod2Wiki -->
 
<!-- Pod2Wiki=item_force_start -->==force_start==
 
  
<!-- End of Pod2Wiki -->
+
<!-- Pod2Wiki= -->
<!-- Pod2Wiki=item_get_last_tick -->==get_last_tick==
+
</div>
 +
<!-- Pod2Wiki=item_$binfilepath -->
 +
===$binfilepath===
  
<!-- End of Pod2Wiki -->
+
$binfilepath = EPrints::Index::binfile
<!-- Pod2Wiki=item_get_pid -->==get_pid==
+
Return the filepath for the indexer bin script file.
  
<!-- End of Pod2Wiki -->
+
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
<!-- Pod2Wiki=item_has_stalled -->==has_stalled==
+
<span style='display:none'>User Comments</span>
 +
<!-- Edit below this comment -->
  
<!-- End of Pod2Wiki -->
 
<!-- Pod2Wiki=item_indexlog -->==indexlog==
 
  
<!-- End of Pod2Wiki -->
+
<!-- Pod2Wiki= -->
<!-- Pod2Wiki=item_is_running -->==is_running==
+
</div>
 +
<!-- Pod2Wiki=item_$suicidefilepath -->
 +
===$suicidefilepath===
  
<!-- End of Pod2Wiki -->
+
$suicidefilepath = EPrints::Index::suicidefile
<!-- Pod2Wiki=item_logfile -->==logfile==
+
Return the filepath for the indexer suicide file.
  
<!-- End of Pod2Wiki -->
+
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
<!-- Pod2Wiki=item_pidfile -->==pidfile==
+
<span style='display:none'>User Comments</span>
 +
<!-- Edit below this comment -->
  
<!-- End of Pod2Wiki -->
 
<!-- Pod2Wiki=item_rolllogs -->==rolllogs==
 
  
<!-- End of Pod2Wiki -->
+
<!-- Pod2Wiki= -->
<!-- Pod2Wiki=item_start -->==start==
+
</div>
 +
<!-- Pod2Wiki=item_indexlog -->
 +
===indexlog===
  
<!-- End of Pod2Wiki -->
+
EPrints::Index::indexlog( $txt )
<!-- Pod2Wiki=item_stop -->==stop==
+
Print out and index log line with <tt>$txt</tt> to the <tt>STDERR</tt>.
  
<!-- End of Pod2Wiki -->
+
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
<!-- Pod2Wiki=item_suicidal -->==suicidal==
+
<span style='display:none'>User Comments</span>
 +
<!-- Edit below this comment -->
  
<!-- End of Pod2Wiki -->
 
<!-- Pod2Wiki=item_suicidefile -->==suicidefile==
 
  
<!-- End of Pod2Wiki -->
+
<!-- Pod2Wiki= -->
<!-- Pod2Wiki=item_tickfile -->==tickfile==
+
</div>
 +
<!-- Pod2Wiki=head_copyright -->
 +
==COPYRIGHT==
 +
{{API:Copyright}}
 +
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
 +
<span style='display:none'>User Comments</span>
 +
<!-- Edit below this comment -->
  
<!-- End of Pod2Wiki -->
 
<!-- Pod2Wiki=item_write_pid -->==write_pid==
 
  
<!-- End of Pod2Wiki -->
+
<!-- Pod2Wiki= -->
<!-- Pod2Wiki=_postamble_ --><!-- End of Pod2Wiki -->
+
</div>
 +
<!-- Pod2Wiki=_postamble_ --><!-- Edit below this comment -->

Latest revision as of 01:31, 10 January 2022

EPrints 3 Reference: Directory Structure - Metadata Fields - Repository Configuration - XML Config Files - XML Export Format - EPrints data structure - Core API - Data Objects


API: Core API

Latest Source Code (3.4, 3.3) | Revision Log | Before editing this page please read Pod2Wiki


NAME

EPrints::Index - Methods for indexing objects for later searching.

User Comments


DESCRIPTION

This module contains methods used to add and remove information from the free-text search indexes.

User Comments


METHODS

User Comments


remove

$ok = EPrints::Index::remove( $session, $dataset, $objectid, $fieldids )

Remove all indexes to the fields $fieldids within the specified objectid that is from the $dataset.

User Comments


remove_all

$ok = EPrints::Index::remove_all( $session, $dataset, $objectid )

Remove all indexes to the specified $objectid part of the $dataset.

User Comments


purge_index

EPrints::Index::purge_index( $session, $dataset )

Remove all the current index information for the given $dataset. Only really useful if used in conjunction with rebuilding the indexes.

User Comments


add

$ok = EPrints::Index::add( $session, $dataset, $objectid, $fieldid, $value )

Add indexes to the fieldid in the specified $objectid. The index keys will be taken from $value.

User Comments


update_ordervalues

EPrints::Index::update_ordervalues( $session, $dataset, $data, $changed )

Update the order values for an object. $data is a structure returned by:

$dataobj->get_data

$changed is a hash of changed fields.

User Comments


insert_ordervalues

EPrints::Index::insert_ordervalues( $session, $dataset, $data )

Create the order values for an object. $data is a structure returned by:

$dataobj->get_data
 

User Comments


delete_ordervalues

EPrints::Index::delete_ordervalues( $session, $dataset, $id )

Remove the ordervalues for item $id from the ordervalues table of $dataset.

User Comments


$pidfilepath

$pidfilepath = EPrints::Index::pidfile

Return the filepath for the indexer PID file.

User Comments


$tickfilepath

$tickfilepath = EPrints::Index::tickfile

Return the filepath for the indexer tick file.

User Comments


$logfilepath

$logfilepath = EPrints::Index::logfile

Return the filepath for the indexer log file.

User Comments


$binfilepath

$binfilepath = EPrints::Index::binfile

Return the filepath for the indexer bin script file.

User Comments


$suicidefilepath

$suicidefilepath = EPrints::Index::suicidefile

Return the filepath for the indexer suicide file.

User Comments


indexlog

EPrints::Index::indexlog( $txt )

Print out and index log line with $txt to the STDERR.

User Comments


COPYRIGHT

© Copyright 2022 University of Southampton.

EPrints 3.4 is supplied by EPrints Services.

http://www.eprints.org/eprints-3.4/

LICENSE

This file is part of EPrints 3.4 http://www.eprints.org/.

EPrints 3.4 and this file are released under the terms of the GNU Lesser General Public License version 3 as published by the Free Software Foundation unless otherwise stated.

EPrints 3.4 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with EPrints 3.4. If not, see http://www.gnu.org/licenses/.

User Comments