Class | EstraierPure::Node |
In: |
estraierpure.rb
|
Parent: | Object |
Abstraction of connection to P2P node.
Get an array of names of administrators. The return value is an array object of names of administrators. On error, `nil’ is returned.
Get the usage ratio of the cache. The return value is the usage ratio of the cache. On error, -1.0 is returned.
Edit attributes of a document. `doc’ specifies a document object. The return value is true if success, else it is false.
Extract keywords of a document. `id’ specifies the ID number of a registered document. The return value is a hash object of keywords and their scores in decimal string or `nil’ on error.
Extract keywords of a document specified by URI. `uri’ specifies the URI of a registered document. The return value is a hash object of keywords and their scores in decimal string or `nil’ on error.
Retrieve a document. `id’ specifies the ID number of a registered document. The return value is a document object. On error, `nil’ is returned.
Retrieve a document. `uri’ specifies the URI of a registered document. The return value is a document object. On error, `nil’ is returned.
Remove a document. `id’ specifies the ID number of a registered document. The return value is true if success, else it is false.
Remove a document specified by URI.
`uri’ specifies the URI of a registered document. The return value is true if success, else it is false.
Add a document. `doc’ specifies a document object. The document object should have the URI attribute. The return value is true if success, else it is false.
Search for documents corresponding a condition. `cond’ specifies a condition object. `depth’ specifies the depth of meta search. The return value is a node result object. On error, `nil’ is returned.
Set the proxy information. `host’ specifies the host name of a proxy server. `port’ specifies the port number of the proxy server. The return value is always `nil’.
Set width of snippet in the result. `wwidth’ specifies whole width of a snippet. By default, it is 480. If it is 0, no snippet is sent. If it is negative, whole body text is sent instead of snippet. `hwidth’ specifies width of strings picked up from the beginning of the text. By default, it is 96. If it is negative 0, the current setting is not changed. `awidth’ specifies width of strings picked up around each highlighted word. By default, it is 96. If it is negative, the current setting is not changed.
Set timeout of a connection. `sec’ specifies timeout of the connection in seconds. The return value is always `nil’.
Synchronize updating contents of the database. The return value is true if success, else it is false.
Get the ID of a document specified by URI. `uri’ specifies the URI of a registered document. The return value is the ID of the document. On error, -1 is returned.