Compact object and compact generator in a category I found two definitions of compact object.

(Lurie, Jacob (2009), Higher topos theory, p.392) Let $\mathcal{C}$ be a category which admits filtered colimits. An object $C \in \mathcal{C}$ is said to be compact if the corepresentable functor
$$
\operatorname{Hom}_{e}(C, \bullet)
$$
commutes with filtered colimits.


(Abelian Categories, Daniel Murfet, Definition 18) Let $\mathcal{C}$ be a category and $A$ an object of $\mathcal{C}$. We say that $A$ is compact (or sometimes small) if whenever we have a morphism $u: A \longrightarrow \bigoplus_{i \in I} A_{i}$ from $A$ into a nonempty coproduct, there is a nonempty finite subset $J \subseteq I$ and a factorisation of $u$ of the following form
$$
A \longrightarrow \bigoplus_{j \in J} A_{j} \longrightarrow \bigoplus_{i \in I} A_{i}.
$$

I don't know how to show that they are equivalent, could you please help me?
In addition, we have the definition of the generator of an abelian category.

(GENERATORS VERSUS PROJECTIVE GENERATORS INABELIAN CATEGORIES, CHARLES PAQUETTE, p.1) Let $\mathcal{A}$ be an abelian category. An object $M$ of $\mathcal{A}$ is a generator of $\mathcal{A}$ if for any object $X$ of $\mathcal{A}$, we have an epimorphism $\bigoplus_{i\in I} M\to X$ where $I$ is some index set.

So what should the compact generator be? Is it a generator such that there is a factorisation of the following form?
$$
\bigoplus_{i\in I} M \to \bigoplus_{i\in J} M \to X.
$$
(all arrows are reversed??)
Thank you very much!
 A: Just to add a bit of context to Todd's answer, I think the reason for this confusion is that the original use of "compact", for topological spaces, can be generalized in different ways.
Firstly, in a poset, the two definitions of compact do agree.  If $C$ is Lurie-compact, then a coproduct $\sum_i A_i$ is the filtered colimit of coproducts of finite subfamilies of the $A_i$, so the assumption implies that any map from $C$ into $\sum_i A_i$ factors through some such finite coproduct.  (Indeed, this direction doesn't require the category to be a poset.)  In the other direction, if $C$ is Murfet-compact, then all colimits in a poset are equivalently coproducts, so any map from $C$ into a filtered colimit factors through a finite sub-colimit, and by filteredness that factors through a single object.
Secondly, a topological space $X$ is compact, in the traditional sense, if and only if the top element of its poset $\mathcal{O}(X)$ of open subsets is compact in either of these categorical senses.  So the difference stems from generalizing this meaning of "compact" to non-posets in different ways.  (Unfortunately, compact topological spaces are not, in general, either Lurie-compact or Murfet-compact in the category of topological spaces!)
A: Part of the tricky thing about this circle of ideas is that several definitions are not equivalent in full generality but become equivalent with extra hypotheses. For example, a basic result about compact objects is the following characterization of module categories, which among other things provides a characterization of Morita equivalences.

Theorem (Gabriel): A cocomplete abelian category $C$ is equivalent to the category $\text{Mod}(R)$ of modules over a ring $R$ iff it admits a compact projective generator $P$ such that $\text{End}(P) \cong R$.

Both "compact" and "generator" in the statement of this theorem are individually ambiguous. "Compact" could mean either Lurie-compact or Murfet-compact, and "generator" can have something like ~7 different meanings, maybe ~3 of which are in common-ish use (?); see Mike Shulman's Generators and colimit closures (which discusses 5 possible definitions) and my blog post Generators (which discusses 6 possible definitions, 4 of which overlap with Mike's) for a discussion.
The happy fact is that nevertheless, the meaning of "compact projective" and of "compact projective generator" in the statement of Gabriel's theorem is unambiguous:

*

*in a cocomplete abelian category, "compact projective," using either Lurie-compactness or Murfet-compactness, is equivalent to the condition that $\text{Hom}(P, -) : C \to \text{Ab}$ commutes with all (small) colimits (this condition is also known as being tiny; see my blog post Tiny objects for a discussion), and

*for compact projective objects in a cocomplete abelian category, nearly all of the definitions of "generator" that I'm aware of collapse and become equivalent. I'll limit myself to naming two: the weakest is that every nonzero object admits a nonzero map from $P$ (which I call "weak generator"; I forget if this name is standard), and the strongest is that every object can be written as the coequalizer of a pair of maps between coproducts of copies of $P$ (which I call "presenting generator"; this is not standard. In an abelian category coequalizers can be replaced with cokernels but this definition generalizes nicely to algebraic categories such as groups and rings).

There is the additional nuance that in a stable $\infty$-categorical setting like the one Lurie works in it seems that one can drop projectivity but I'm not sure what the precise statements are. E.g. I believe there's a stable $\infty$-categorical analogue of Gabriel's theorem characterizing module categories over $E_1$ ring spectra and I believe that analogue involves compact generators.
Anyway, for what it's worth I would advocate for Lurie-compactness as the "default" meaning of compactness. Murfet-compactness is quite specific to the abelian setting, but Lurie-compactness is nice in many settings; for example, in the category of models of a Lawvere theory (groups, rings, etc.) an object is Lurie-compact iff it's finitely presented. Already this implies the not-entirely-obvoius fact that for modules being finitely presented is Morita invariant.
A: They're not equivalent. For example, Lurie-compact objects in a category of $R$-modules are the same as finitely presentable modules. (The same is true for any category of algebras for a Lawvere theory, i.e., an algebraic theory whose operations are finitary, subject to universally quantified equational axioms.) On the other hand, Murfet-compact objects in a category of $R$-modules need not be even finitely generated (although they will be if $R$ is Noetherian). There was a fairly long discussion about this here: "Sums-compact" objects = f.g. objects in categories of modules?
Different communities sometimes use the same term differently. The term 'compact' is in some ways suggestive, but I don't think it's optimized.
