Xapian::Document(3pm) User Contributed Perl Documentation Xapian::Document(3pm)NAME
Search::Xapian::Document - Document object
DESCRIPTION
This class represents a document in a Xapian database.
METHODS
new Class constructor.
clone
Return a clone of this class.
get_value (value_no)
Returns the value by the assigned number.
add_value <value_no> <value>
Set a value by value number.
remove_value <value_no>
Removes the value with the assigned number.
clear_values
Clear all set values.
get_data
Return all document data.
set_data <data>
Set all document data. This can be anything you like.
add_posting <term> <position> [<weight>]
Adds a term at the given position. weight defaults to 1.
remove_posting <term> <position> [<weight]
Removes a term from the given position. weight defaults to 1.
add_term <term> [<weight>]
Adds a term without positional information. weight defaults to 1.
add_boolean_term <term>
Adds a term intended for boolean filtering (its wdf contribution will be 0).
remove_term <term>
Removes a term without positional information.
clear_terms
Remove all terms from the document.
termlist_count
Returns number of terms in the document.
termlist_begin
Iterator for the terms in this document. Returns a Search::Xapian::TermIterator.
termlist_end
Equivalent end iterator for termlist_begin(). Returns a Search::Xapian::TermIterator.
values_count
Return number of defined values for this document.
values_begin
Return a Search::Xapian::ValueIterator pointing at the start of the values in this document.
values_end
Return a Search::Xapian::ValueIterator pointing at the end of the values in this document.
get_description
Return a description of this object.
SEE ALSO
Search::Xapian::Database
perl v5.14.2 2012-05-09 Xapian::Document(3pm)
Check Out this Related Man Page
Plucene::Search::TermQuery(3pm) User Contributed Perl Documentation Plucene::Search::TermQuery(3pm)NAME
Plucene::Search::TermQuery - a query that contains a term
SYNOPSIS
# isa Plucene::Search::Query
$term_query->normalize($norm);
my $ssw = $term_query->sum_squared_weights($searcher);
my $as_string = $term_query->as_string($field);
DESCRIPTION
A query that matches a document containing a term.
Term query are the simplest possible Plucene queries and are used to match a single word. Term queries are represented by instances of the
TermQuery class and contain the desired term (word) and a field name, both are case sensitive.
The field specified in a Term query must be a document field that was specified as 'indexible' during the indexing process. If the field
was specified during indexing as 'tokenized' than the term will be matched against each of tokens (words) found in that field, otherwise,
it will be matched against the entire content of that field.
A term query may have an optional boost factor (default = 1.0) that allows to increase or decrease the ranking of documents it matches.
METHODS
term / idf / weight
Get / set these attributes
sum_squared_weights
my $ssw = $term_query->sum_squared_weights($searcher);
This will return the sum squared weights for the passed in searcher.
normalize
$term_query->normalize($norm);
to_string
my $as_string = $term_query->as_string($field);
perl v5.12.4 2011-08-14 Plucene::Search::TermQuery(3pm)
Hi All,
I have an input_file below and i would like to use Perl to search for the term "aaa" and output the 3rd term in the same row as "aaa".For Example, i want to search for the term "ddd" and would want the code to ouput the 3rd term in the same row which is "fff". Can somebody help ?
... (28 Replies)
Hi all,
I prepared a document on UNIX OS. Its an humble attempt to share my knowledge.
Please review the document attached and correct if any mistakes and any suggestions to make it more useful and any troubleshooting information if needed to add.
Please help in making the document to add... (2 Replies)
Hi All,
I have an awk code below. How can i edit it such that once it finds the term "start" , it will extract all the rest of data thereafter ?
awk '/start/, /stop/' file (4 Replies)
Hi All,
I am developing an application which need to search in postgres db for the files.
I wanted to use Xapian for that. I am not sure how to proceed further for it .
I have downloaded the xapian 0.9.9 version. I need to bind my perl db with the xapian search mechanism.
Any help in... (1 Reply)
hey guys, I'm working on a term project for a c/unix class. The basis of the program is that it will calculate the weight/balance of a plane. I'm hoping to have an input file as such:
"
Pilot weight:
Passenger weight:
baggage wieght:
etc
"
and the idea is that I'm trying to use... (2 Replies)
I'm using less to find terms in a 6 gb text file in OS X in the terminal. When I first search for the patter, it finds it, scrolls the document to the correct location, and highlights it. But when I search again, the document scrolls to a new further location (I'm assuming it's found the pattern... (2 Replies)
Hi All,
I have a file that I would like to search for data and replace other data by record position number:
Example search..
search for "CLARK KENT" and replace Amt data "000025" with "000155"???
I'm able to search and replace unique data but, came to a stump when wanting to replace data... (11 Replies)
Gurus,
I am relatively new to Unix scripting and am struck with a problem in my script. I have positional input file which has a FLAG indicator in at position 11 in every record of the file.
If the Flag has value =Y, then the record from the input needs to be written to a new file.However if... (3 Replies)
Hi guys,
I'm moving some vPars from BL860c I2 and BL870c I2 using the DRD clone and relocation. In some case, as instance to upgrade to BL870c I2, the ERRATA document reports some additional driver to be added to the image made by the DRD and then recompile the kernel before the move to the... (0 Replies)