SRU::R...e::Term(3pm)

πŸ“¦
version 1.01 Β· 2 versions
  • 1.01 Β· debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking (latest)
  • 1.01 Β· ubuntu jammy
, in debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking

πŸ’– SRU::Response::Term πŸ’–

okay bestie, welcome to SRU::Response::Term β€” that's the Perl module, manual page SRU::R...e::Term(3pm) if you're the kind of girl who reads headers πŸ‘‘ β€” and it's literally a class for representing terms in a Scan response. no cap.


✨ NAME ✨

SRU::Response::Term β€” a whole entire class for representing terms in a Scan response πŸ¦‹


✨ SYNOPSIS ✨

not me showing up with zero synopsis lines πŸ’€ the original page just... doesn't have one. it's giving minimalist. it's giving mystery. we move on.

✨ DESCRIPTION ✨

So here's the tea πŸ“ β€” an SRU::Response::Term object bundles up information about one single term contained in a SRU::Response::Scan object. That's it. That's the job.

And because one term is never enough for a main character, a scan object can contain multiple term objects. it's a whole friend group, fr fr 🌸


✨ METHODS ✨

🌈 new()

The constructor, and you must at least pass the value parameter, okay? like, mandatory mandatory:

my $term = SRU::Response::Term->new( term => "Foo Fighter" );

And in addition to that, you can also pass the numberOfRecords, displayTerm, whereInList, and extraTermData parameters β€” or set them separately with their accessors, whichever vibe you're on πŸ’…

🌈 value()

The term exactly as it appears in the index. Like, character-for-character, no glow-up, no filter.

And the cute part: this term should be able to be sent in a query as is to retrieve the records it derives from. plug and play, bestie ✨

🌈 numberOfRecords()

The number of records which would be matched if the index in the request's scanClause was searched with the term in the 'value' field.

tl;dr: how many records this term would pull up if you actually went looking πŸ”₯

🌈 displayTerm()

A string to display to the end user in place of the term itself. so like, the term's little stage name πŸŽ€

For example, this might add back in stopwords which do not appear in the index, or diacritics which have been normalised. giving the people what they want, restoring what got stripped πŸ¦‹

🌈 whereInList()

A flag to indicate the position of the term within the complete term list. and it must be one of the following values, no improvising:

  • 'first' β€” the first term πŸ₯‡
  • 'last' β€” the last term 🏁
  • 'only' β€” the only term (main character energy, obviously) πŸ‘‘
  • 'inner' β€” any other term πŸ’«

🌈 extraTermData()

Additional profile specific information. More details are available in the extensions section. iykyk πŸ“Ž

🌈 asXML()

okay so this method is listed and that's literally all the original page says about it. no description. nothing. it's just... there. iconic behaviour honestly πŸ™ˆ i'm not about to make things up about it, so: asXML() β€” it exists. that's the fact we have.

This software is copyright (c) 2013 by Ed Summers.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.


and that's the whole page, bestie!! 🌸 no detail left behind, every method accounted for, every value preserved.

sign-off time ✨ this one's from perl v5.34.0, dated 2022-06-17, and it lives under the name SRU::R...e::Term(3pm) β€” periodt πŸ’…πŸ’–

πŸ“¦ where this page comes from